| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: indirection |
-=> Quoting Paul Edwards to Ian Binnie <=- Hello Paul, PE> y = * x; PE> y = *x; IB> are equivalent, whitespace is ignored. IB> (As I am quite sure you already know.) PE> I am not sure anyone knows everything about C. Well, as far as standard C is concerned, I'm sure that the members of the ANSI & ISO committees, not to mention Brian Kernighan and Dennis Ritchie probably do know all the rules. Besides, there are other programmers out there that do seem to be familiar with every paragraph of the ISO standard. :) PE> I didn't know the above. Fair enough, but it does make sense, since whitespace is permitted anywhere (except of course in the middle of identifiers :). OTOH, I will admit that when I first learned C I also believed that the * had to bind to the variable name. :) PE> Another thing I only found out recently is that you have to go PE> unsigned int xxx:1; in a structure, rather than unsigned short PE> xxx:1; Well, it's actually a bitfield, it just looks an awful lot like a structure, especially since it uses the struct keyword. ;) The reason that they have to be int is that a bitfield is defined in terms of a natural machine word. FWIW, I rarely use bitfields, since they are not portable & I'm quite comfortable with the bitwise arithmetic operators. Michael Stapleton of Graphic Bits. * AmyBW v2.10 * ... This tagline is encrypted --- Blue Wave/RA v2.10 AmyBW* Origin: The Three Amigas - better than two (3:713/615.0) SEEN-BY: 50/99 620/243 623/630 711/401 409 410 413 430 808 809 932 934 SEEN-BY: 712/508 515 713/111 317 601 611 615 618 700 826 888 914 714/906 SEEN-BY: 800/1 @PATH: 713/615 888 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.