Re: [hlcoders] string to #define

2002-05-30 Thread Pat Magnan
o: <[EMAIL PROTECTED]> Sent: Wednesday, May 29, 2002 8:13 PM Subject: Re: [hlcoders] string to #define > > Yes! I had given up on this idea, but I guess I didn't imagine it after all > :) This is exactly what I was thinking of. > > Thanks for finding this > > M

Re: [hlcoders] string to #define

2002-05-29 Thread Mugsy _
Yes! I had given up on this idea, but I guess I didn't imagine it after all :) This is exactly what I was thinking of. Thanks for finding this Mugsy >From: "Pat Magnan" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >Subject:

Re: [hlcoders] string to #define

2002-05-28 Thread Pat Magnan
that code appears to do. Pat 'sluggo' Magnan Tour of Duty Mod http://www.tourofdutymod.com - Original Message - From: "Mugsy _" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 07, 2002 2:29 AM Subject: Re: [hlcoders] string to #define

Re: [hlcoders] string to #define

2002-05-07 Thread Tim Holt
LOL exactly what I was going to post. I can really see how vital a Perl version of the SDK could be! Sebastian Steinlechner wrote: >Actually, I guess he's trying to do something different, perhaps inspired >from PHP or Perl. In these languages, you can do something like this: >$foo = "What a ni

Re: [hlcoders] string to #define

2002-05-07 Thread Tim Holt
ing > into a > variable name directly. > > But I'm most likely on crack. > > > >> From: "Josh Coyne" <[EMAIL PROTECTED]> >> Reply-To: [EMAIL PROTECTED] >> To: <[EMAIL PROTECTED]> >> Subject: Re: [hlcoders] string to #define >&

RE: [hlcoders] string to #define

2002-05-07 Thread Dynerman David M
esday, May 07, 2002 7:30 AM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] string to #define > That still does a O(n) search with string compares. > > The one I'm dreaming of is different. > If you want fast string table lookups, might I suggest a Trie (i.e. a tree where each no

Re: [hlcoders] string to #define

2002-05-07 Thread botman
> That still does a O(n) search with string compares. > > The one I'm dreaming of is different. > If you want fast string table lookups, might I suggest a Trie (i.e. a tree where each node has 26 children for each letter A-Z)... http://www.mmi.ee/~enn/node38.html ...but it really seems like ove

Re: [hlcoders] string to #define

2002-05-07 Thread Mugsy _
That still does a O(n) search with string compares. The one I'm dreaming of is different. >From: "Josh Coyne" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >Subject: Re: [hlcoders] string to #define >Date: Tue, 7 M

Re: [hlcoders] string to #define

2002-05-06 Thread Josh Coyne
do it... - Original Message - From: "Mugsy _" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 06, 2002 11:54 PM Subject: Re: [hlcoders] string to #define > I need to go the other way, from string to int. > > > >From: "Josh Coyne&qu

Re: [hlcoders] string to #define

2002-05-06 Thread Oskar 'Zoot' Lindgren
atoi()? - Original Message - From: "Dynerman David M" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 07, 2002 6:29 AM Subject: RE: [hlcoders] string to #define > What about the engine functions MAKE_STRING() and STRING()? > > david > &

RE: [hlcoders] string to #define

2002-05-06 Thread Dynerman David M
What about the engine functions MAKE_STRING() and STRING()? david -Original Message- From: Mugsy _ [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 10:55 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] string to #define I need to go the other way, from string to int. >F

Re: [hlcoders] string to #define

2002-05-06 Thread Mugsy _
I need to go the other way, from string to int. >From: "Josh Coyne" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >Subject: Re: [hlcoders] string to #define >Date: Mon, 6 May 2002 23:52:26 -0400 > >well with the

Re: [hlcoders] string to #define

2002-05-06 Thread Josh Coyne
n NULL;// or return "" or whatever u want } should give you an idea of what i mean by a list array - Original Message - From: "Mugsy _" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 06, 2002 11:40 PM Subject: Re: [hlcoders] string to #define

Re: [hlcoders] string to #define

2002-05-06 Thread Mugsy _
ot;Josh Coyne" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >Subject: Re: [hlcoders] string to #define >Date: Mon, 6 May 2002 23:25:33 -0400 > >hmm > >a possible idea could be a string table maybe > >an array of string/code

Re: [hlcoders] string to #define

2002-05-06 Thread Josh Coyne
macros dont work in string blocks, at least not in MSVC - Original Message - From: "Dynerman David M" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 06, 2002 11:20 PM Subject: RE: [hlcoders] string to #define > That wasn't the question Ma

Re: [hlcoders] string to #define

2002-05-06 Thread Josh Coyne
lt;[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 06, 2002 11:10 PM Subject: RE: [hlcoders] string to #define > 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

RE: [hlcoders] string to #define

2002-05-06 Thread Dynerman David M
From: Marcelo de Paula Bezerra [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 10:18 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] string to #define I believe it won't work. This works about the same as #define WEAPON_GARAND 2, you can't do things like array["WEAPON_GARAND&qu

Re: [hlcoders] string to #define

2002-05-06 Thread Marcelo de Paula Bezerra
I believe it won't work. This works about the same as #define WEAPON_GARAND 2, you can't do things like array["WEAPON_GARAND"]. Unfortunataly, the long if else block looks like the way to go. On Mon, 2002-05-06 at 23:20, Mugsy _ wrote: > > It doesnt have to be a define, it can be an enumerated

RE: [hlcoders] string to #define

2002-05-06 Thread Dynerman David M
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 bein

RE: [hlcoders] string to #define

2002-05-06 Thread Leon Hartwig
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 #

RE: [hlcoders] string to #define

2002-05-06 Thread Dynerman David M
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. dav

Re: [hlcoders] string to #define

2002-05-06 Thread Mugsy _
It doesnt have to be a define, it can be an enumerated variable. ( since #define names would probably be tossed in a compiled version ) enum { WEAPON_GARAND = 2 }; >From: "Mugsy _" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: [hlcoders] string to #define