Re: [code] bool/class etc etc etc...

From: Brian Gray (mandy@NETCOM.COM)
Date: 08/31/97


On Sun, 31 Aug 1997, David Eliott wrote:

> In my compiler, a lot of names used for variables are reserved names in
> my compiler, like bool, and class, and maybe more, haven't looked
> through it all yet, probably new too.
>
> So now, I'm thinking, do I need to replace every class with classes or
> something, and then have to go through the WHOLE code replacing where
> class is used to classes? same thing for bool?

Bool is easy.  It's actually a data type in C++, so commenting out the
typedef is actually the correct answer (it could conceivably alter the
size of your structs, but then  so could a different size long).

For everything else, just do global search and replaces.  You'll get
errors on new, virtual, class, and one other thing I forget.
Respectively, I would replace them with newstr (or newint or newlong...),
vnum, and mudclass.

Oh yeah, and all those "struct"s in argument lists and local variable
declarations are all unnecessary now.  You only need the keyword struct
when you actually define the prototypes.

 -- Brian


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST