Re: [IDEA] External argument parser

From: George (greerga@CIRCLEMUD.ORG)
Date: 08/27/98


On Fri, 28 Aug 1998, Andrey Fidrya wrote:

>Here is my definition of ACMD:
>#define ACMD(name)  \
>   void name(struct char_data *ch, char *parg1, char *parg2, \
>             struct char_data *ach1, struct char_data *ach2, \
>             struct obj_data *aobj1, struct obj_data *aobj2, \
>             char *argument, int cmd, int subcmd)

Ouch, that's a lot of variables to push and pop...

>Example of command definition:
>{ "give", POS_RESTING, do_give, 0, 0, A_MOBJ | W_INV,  A_CH | W_RM},
>First argument: Multiple (or single) Object(s) in inventory, second argument -
>character in same room.
>If you want to keep original do_give, just describe both arguments as NULLs
>and do_give will receive unmodified string from player.
>
>Btw, I saw no replies from Jeremy and George... Can you write me please, what
>do you think about this system?

Jeremy just went from east coast to west coast in a week, don't expect a
reply soon. ;)

Personally, I think it looks fine, but it's not something I'd consider more
clean than the current method.

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://mouse.van.ml.org/ (not done) | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | 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/15/00 PST