Re: [ Idea ] actf() ?!?!

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 10/08/97


On Tue, 7 Oct 1997, David Klasinc wrote:

-+Banzai!
-+
-+ Would it make sense? That is writing actf()? :)

No, it'd not make sense and it'd be difficult.  You see, for an
"xxxf()" function to work, the format string has to be last.
That means,

  act(char *, bool, char_data *, void *, void *, int);

would have to be changed to

  actf(bool, char_data *, void *, void *, int, char *, ...);

which would be confusing when you're using act() and actf() in the
same area of code.  And then, of course, there's the fact that act()
already accepts one text parameter in the middle, if you actually
need it (and it's very rarely needed).  Try:

  act("$n $T $N.", FALSE, ch, verb_str, victim, TO_CHAR);

I think that works, and there's very few cases when you'll need the
printf behaviour, and in those rare cases it'd make more sense to
use sprintf() than to write a new actf() function.


--
Daniel Koepke -:- dkoepke@california.com -:-  [Shadowlord/Nether]
Think.


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