Thread: pointers *shudder*

  1. #31
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by esbo
    "but a pointer is a variable capable of holding an address"

    I wound not agree with that.

    I would say
    "but a pointer variable is a variable capable of holding an address"

    In my opinion a pointer is not necessarilly a variable.

    I mean an interger can be a variable and often is, but it is not always, sometimes it is
    a constant, ie 5.
    Comparing an integer to a pointer isn't even a viable argument because other than the fact that they're both words, they're not the same thing. You can't take out a piece of paper and write a pointer down on it. It's because unlike an integer, a pointer is not data. It's a variable... that holds and address... as we've told you many time.
    Sent from my iPadŽ

  2. #32
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >In my opinion a pointer is not necessarilly a variable.
    You're certainly welcome to your opinion, but that doesn't mean you're correct. Keep that in mind.

    >I mean an interger can be a variable and often is, but it is not always, sometimes it is
    >a constant, ie 5.
    The problem seems to be that you're having difficulty seeing the difference between an object and a value. However, since your fundamental misunderstanding really doesn't matter as it's close enough to use pointers correctly, and because you seem excessively violent toward learning, I won't waste my time anymore.
    My best code is written with the delete key.

  3. #33
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by SlyMaelstrom
    Comparing an integer to a pointer isn't even a viable argument because other than the fact that they're both words, they're not the same thing. You can't take out a piece of paper and write a pointer down on it. It's because unlike an integer, a pointer is not data. It's a variable... that holds and address... as we've told you many time.
    Well if you don't believe me maybe you will believe a computing dictionary?

    http://foldoc.org/foldoc.cgi?query=pointer


    "An address, from the point of view of a programming language."

    The word variable is not even mentioned.
    If you think they are wrong then maybe you should take the matter up with them?
    .

  4. #34
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by esbo
    Well if you don't believe me maybe you will believe a computing dictionary?
    Quote Originally Posted by http://en.wikipedia.org/wiki/Pointer
    In computer science, a pointer is a programming language datatype whose value refers directly to ("points to") another value stored elsewhere in the computer memory using its address.
    Quote Originally Posted by http://cslibrary.stanford.edu/102/PointersAndMemory.pdf
    A pointer works a little differently— it does not store a simple value directly. Instead, a
    pointer stores a reference to another value.
    Quote Originally Posted by http://cplus.about.com/od/beginnerctutorial/l/aa010502a.htm
    A pointer is a special type of variable that contains a memory address rather than a data value.
    Quote Originally Posted by http://library.thinkquest.org/C0111571/manual.php?tid=53
    A Pointer is a 4-byte variable that holds the memory location of the actual variable that it is pointing to. It could point to pretty much anything in memory, including functions, classes, variables, and even other pointers.
    Just cause you got some random unknown website to give you wrong information doesn't make you correct. As Prelude said, you seriously appear to refuse to learn, so I'm done, as well. As it stands, I hope all of your knowledge didn't come from foldoc.org because it's then regretable knowing someone is going to have to correct you everytime.
    Last edited by SlyMaelstrom; 08-29-2006 at 01:07 PM.
    Sent from my iPadŽ

  5. #35
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by SlyMaelstrom
    Just cause you got some random unknown website to give you wrong information doesn't make you correct. As Prelude said, you seriously appear to refuse to learn, so I'm done, as well. As it stands, I hope all of your knowledge didn't come from foldoc.org because it's then regretable knowing someone is going to have to correct you everytime.

    It was not randon, it was the first dedicated computing dictionary that google returned.
    But I guess you know better tham the computing department of Imperial College London!


    Supported by Imperial College Department of Computing http://foldoc.org/ 14205 terms, 5139258 bytes
    Copyright © 1993 by Denis Howe, All Rights Reserved Last modified: 2006-08-25 02:30

    --------------------------------------------------------------------------------
    Last edited by esbo; 08-29-2006 at 01:29 PM.

  6. #36
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by esbo
    But I guess you know better tham the computing department of Imperial College London!
    Why do these people always think schools actually know something? Oh, and by the way, the answer to your question was 'Yes'.

    You want to know why you're really wrong? Memory addresses cannot be lvalues. Pointers can. You lose. Imperial College London loses.


    Quzah.
    Hope is the first step on the road to disappointment.

  7. #37
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Well if you don't believe me maybe you will believe a computing dictionary?
    We believe the standard, not an online dictionary and certainly not every yahoo who has an opinion.

    >The word variable is not even mentioned.
    Technically, the word variable isn't mentioned in the standard either. Object is fairly common (for the most part a direct synonym of variable), and happens to be directly applied to the definition of "pointer type".

    >But I guess you know better tham the computing department of Imperial College London!
    So it seems. Of course, to give them credit, they're talking about computing in general and we're talking about specifics defined by the only authoritative source for the C language: the ISO standard. Until you quote us chapter and verse from the standard that conclusively proves your point, you're wrong. Such is the case when several senior members of this forum disagree with you on a technical point.
    My best code is written with the delete key.

  8. #38
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by Prelude
    >Well if you don't believe me maybe you will believe a computing dictionary?
    We believe the standard, not an online dictionary and certainly not every yahoo who has an opinion.

    >The word variable is not even mentioned.
    Technically, the word variable isn't mentioned in the standard either. Object is fairly common (for the most part a direct synonym of variable), and happens to be directly applied to the definition of "pointer type".

    >But I guess you know better tham the computing department of Imperial College London!
    So it seems. Of course, to give them credit, they're talking about computing in general and we're talking about specifics defined by the only authoritative source for the C language: the ISO standard. Until you quote us chapter and verse from the standard that conclusively proves your point, you're wrong. Such is the case when several senior members of this forum disagree with you on a technical point.
    Well according to the Imperial College London's computing department I am right, I am sure they have a copy of the standard. You have not provided any evidence whatsoever to back up your opinion. I think the onus is therefore on you to provide some real evidence to backup your opinion. If you cannot quote chapter and verse from the standard that I am wrong then all the evidence provided so far proves I am right. I have quoted the definiition given in the most authorative source I could find and it backs me up 100%, those who disagree with me have quote no authorative sources whatsoever. So I will let the reader decide who to trust.
    Last edited by esbo; 08-29-2006 at 03:44 PM.

  9. #39
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I just proved you wrong. Prove me wrong.

    [edit]
    Terms, definitions and symbols

    3.14
    object

    region of data storage in the execution enviornment, the contents of which can represent values

    3.17
    value

    precise meaning of the contents of an object when interpreted as having a specific type
    A memory address is not an object. It is a value. A pointer is an object, not a value. You can get the address of a pointer. You cannot get the address of an address. You can get the address of an object (pointer) holding that value, but you cannot get the address of an address, because they don't have them. Just like the number 10 doesn't have an address. It's a value.[/quote]

    Oh, and while I'm at it....

    6.2.5 - Types
    -- A pointer type may be derived from a function type, an object type, or an incomplete
    type, called the reference type. A pointer type describes an object whose value
    provides a reference to an entity of the reference type. A pointer type derived from
    the reference type T is sometimes called ``pointer to T''. The construction of a
    pointer type from a referenced type is called ``pointer type derivation''.
    So anyway, I'm still waiting on that whole ``prove me wrong'' thing...
    [/edit]


    Quzah.
    Last edited by quzah; 08-29-2006 at 04:24 PM.
    Hope is the first step on the road to disappointment.

  10. #40
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by quzah
    Why do these people always think schools actually know something? Oh, and by the way, the answer to your question was 'Yes'.

    You want to know why you're really wrong? Memory addresses cannot be lvalues. Pointers can. You lose. Imperial College London loses.


    Quzah.

    I think you will find the Imperial College and is correct and that unfortunately on this occasion you are wrong, if you expect me to believe a poster to a C forum over the Computing Depratment of Imperial College London then you are mistaken!!

  11. #41
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    How about believing 4 senior posters of this forum?

    Not that your belief is worth that much to us. Sure, it's a little sad, but we certainly won't cry. It's only yourself you're hurting.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #42
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by quzah
    I just proved you wrong. Prove me wrong.


    Quzah.

    Speak to the Computing Department of Imperial College London if you want futher clarification on the matter, I am sure they wil be more than willing to help you, such acadmic institutions are normally more than willing to help.
    You can contact them here:-

    180 Queen's Gate
    South Kensington Campus
    Imperial College London
    SW7 2AZ

    Tel: +44 (0)20 7594 8298
    Fax: +44 (0)20 7581 8024

    Do let us know how you get on!

  13. #43
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by CornedBee
    How about believing 4 senior posters of this forum?

    Not that your belief is worth that much to us. Sure, it's a little sad, but we certainly won't cry. It's only yourself you're hurting.

    I have said all I have to say on the matter, I have provided the contact details of Imperial college London's Computing Department, if you want to take the matter futher please contact them.

  14. #44
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Why?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  15. #45
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by esbo
    Do let us know how you get on!
    Get the ........ off the C board, coward. You two-faced piece of ......... You don't come in here with some bull........ reference you pull out of your ass, saying "prove me wrong" and then puss out when you're called on it. Get the ........ out of here you worthless troll.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using pointers to pointers
    By steve1_rm in forum C Programming
    Replies: 18
    Last Post: 05-29-2008, 05:59 AM
  2. function pointers
    By benhaldor in forum C Programming
    Replies: 4
    Last Post: 08-19-2007, 10:56 AM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 01:18 PM