Well they say when you're not sure try..so I did and Leon's right (at
least with VC++)

I'm not sure where I saw/read that it would scan quotes, but the define
didn't work for me (it would just print out WEAPON_GARAND instead of 2)

Looks like we're stuck defining string literals or numbers, but not
mixing & matching.

david

-----Original Message-----
From: Leon Hartwig [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 9:50 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [hlcoders] string to #define

I'm sure it depends on which preprocessor is being used, but I doubt
most
modern ones do this.


> -----Original Message-----
> From: Dynerman David M [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 06, 2002 7:35 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [hlcoders] string to #define
>
>
> The pre-processors scan through source files replacing the define with
> the value.
>
> I'm not 100% sure, but about 95% that it looks in strings as well, so
>
> someFuncThatTakesAString("WEAPON_GARAND");
>
> will get changed to
>
> someFuncThatTakesAString("2"); //constant string 2\0
>
> before its compiled.
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to