Tagged Obj/Wld/Mob/Zon files

From: Akuma/Chris Baggett/DOOMer (doomer@BAYOU.COM)
Date: 12/25/97


first of all i didn't put Shp in the subject b/c
it's not useful to me to change the Shp files. anyway, onto my point.

I was (successfully) changing all my Wld/.../ etc files to Tagged
(ala Ascii Pfiles) and I came upon one big question.

i have a basic switch statement
switch (*tag) {
case 'A': if (!strcmp(tag, "Asomething"))
             do this;
          else if (!strcmp(tag, "A234"))
             do that;
          break;
default : complain about unknown tag; break;
}
and then it would continue the loop.
my question is this (with a small statement beforehand):
Seeing as how it's not really feasible for me to put in
12-20 different else complain about unknown 'A'/'B' tag
I was wondering if it was possible to do a simple goto default as the else
ie in the above example
after 'do that;' and before the 'break;' could i just add
else { goto default; }
to make it always log an error on an unfounded tag?
this question arises mainly b/c if the tag started with an 'A'
it would not complain if it wasn't found in the list.
but if it started with a letter that WASN'T one of the case 'letter'
statements
ie  case 'Q'  it would complain.

is this a good option? (considering default: is a label)

or is there a better way?

please make sure you've read the entire email before responding.

Thanks for any help.
Merry Christmas, Happy New Year.

Akuma the Raging Coder

  +------------------------------------------------------------+
  | "The poets talk about love, but what I talk about is DOOM, |
  |      because in the end, DOOM is all that counts." -       |
  |   Alex Machine/George Stark/Stephen King, The Dark Half    |
  |        "Nothing is IMPOSSIBLE, Just IMPROBABLE"            |
  |   "Easier Said Than Done, But Better Done Than Said..."    |
  +------------------------------------------------------------+


     +------------------------------------------------------------+
     | 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