• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: static typing (Learning Cocoa Chapter 13)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static typing (Learning Cocoa Chapter 13)


  • Subject: Re: static typing (Learning Cocoa Chapter 13)
  • From: "Erik M. Buck" <email@hidden>
  • Date: Fri, 21 Sep 2001 16:09:10 -0500

In the name of aesthetic flame wars:
The asterisk indicates that a variable is a pointer not that a type is a
pointer. The asterisk therefore belongs with the variable and not the type.

The simplest highlight of that fact follows:

char *foo, bar, *baz;

foo is a pointer (probably 4 bytes)
bar is a character (probably 1 byte)
baz is a pointer (probably 4 bytes)

If the pointerness was part of the type then

char* foo, bar, *baz;

would make foo a pointer, bar a pointer, and baz a pointer to a pointer
which is of course wrong and ludicrous.


----- Original Message -----

  • Follow-Ups:
    • Re: static typing (Learning Cocoa Chapter 13)
      • From: Rosyna <email@hidden>
    • Re: static typing (Learning Cocoa Chapter 13)
      • From: Chris Gehlker <email@hidden>
    • Re: static typing (Learning Cocoa Chapter 13)
      • From: Dennis De Mars <email@hidden>
    • Re: static typing (Learning Cocoa Chapter 13)
      • From: Chris Rudolph <email@hidden>
References: 
 >Re: static typing (Learning Cocoa Chapter 13) (From: John Pannell <email@hidden>)

  • Prev by Date: XML-RPC or SOAP ?
  • Next by Date: NSTask / NSPipe / FTP
  • Previous by thread: Re: static typing (Learning Cocoa Chapter 13)
  • Next by thread: Re: static typing (Learning Cocoa Chapter 13)
  • Index(es):
    • Date
    • Thread