Re: size of a byte and int?
From: 42Bastian Schick (bastian42_at_yahoo.com)
Date: 01/27/05
- Next message: CBFalconer: "Re: c99 on Microsoft Visual Studio"
- Previous message: 42Bastian Schick: "Re: size of a byte and int?"
- In reply to: Chris Torek: "Re: size of a byte and int?"
- Next in thread: Hans-Bernhard Broeker: "Re: size of a byte and int?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 27 Jan 2005 11:17:50 GMT
>
>Suppose I, as your implementor, put this in <stdio.h> (contrary to
>the standard's requirement that I do not do this):
>
> #define i 42
> #define tmp "ha ha"
>
>Now you, the user, write your program, including a function:
>
> #include <stdio.h>
> ...
> void f(...) {
> int i;
> char *tmp;
> ...
>
>When you go to compile this, the compiler "sees" the top of your
>function f() written as:
>
> int 42;
> char *"ha ha";
>
>and gives you a bunch of strange syntax error messages.
>
>I, the implementor, keep out of you way by making sure I do this:
>
> /* flags for __sflag field */
> #define __SRD 1
> #define __SWR 2
> [etc]
>
>You, the user, keep out of my way by not using names like "__SRD".
>For the most part, all the names starting with "_" are mine, and
>all the rest are yours. If I define "i" or "tmp", it is my fault
>for breaking your code. If you define _ZOG, it is your fault for
>breaking my code.
Now, that's clear. Thanks.
-- 42Bastian Do not email to bastian42@yahoo.com, it's a spam-only account :-) Use <same-name>@monlynx.de instead !
- Next message: CBFalconer: "Re: c99 on Microsoft Visual Studio"
- Previous message: 42Bastian Schick: "Re: size of a byte and int?"
- In reply to: Chris Torek: "Re: size of a byte and int?"
- Next in thread: Hans-Bernhard Broeker: "Re: size of a byte and int?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|