Re: [IDEA] External argument parser

From: Stephen Wolfe (siv@CYBERENET.NET)
Date: 08/27/98

> > an alternative that i think might be better is changing it to an argv and
> > argc type guess that's all i have to say about
> > that..
> Why? :I

because it would be easier to use for commands that require more than two
arguments, ala set or cast..

if (argc < 4)
  send_to_char("Usage: set <vict> <field> <value>\r\n", ch);

if (!(vict = get_char_vis(ch, argv[2]))

i'm not saying that you're method is fact, it looks like it would
significantly clean up the argument parsing in the ACMD's..but you'd still
have to make sure everything is valid..

if (!ach1)

compared to:

if (!(vict = get_char_vis(ch, arg)))

the second, while a little longer, is less wouldn't
be able to tell just by looking at the command whether or not it
was a character in the room or world..shrug..


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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