On Wed, 2002-07-24 at 14:21, Mathew Earle Reuther wrote: > I cannot for the life of me get my switches to work without using the > same format as in class.c parse_class. The example of parse_class: > > int parse_class(char arg) > { > arg = LOWER(arg); > > switch (arg) { > case 'm': return CLASS_MAGIC_USER; > (etc...) > > However, I don't want to use LOWER, so I just do it thusly: > > int parse_class(char arg) > { > > switch (arg) { > case 'M': return CLASS_MAGIC_USER; > (etc...) > > Tells me arg is not initiallized. Which compiler is it? as it's looks like it's wrong. (assuming the code is bang on identical as above) It is reporting the error on that line? You might want to try using const char arg (just because I'm paranoid and sprinkle const wherever possible 8) you've not got a global called arg? Chris -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT