From: Rich Chiavaroli (rchiav@FRONTIERNET.NET)
Date: 09/10/97

> Say you have this line (pseudo-code):
>   if (sscanf(line, " %d %d %d ", &i, &j, &k) != 3)
>     error;
> to make an optional fourth argument all you have to do is,
>   if (sscanf(line, " %d %d %d %d ", &i, &j, &k, &l) < 3)
>     error;
> this way, 3-infinite (theoritically) arguments can be accepted on the
> same line [well, for as long as it fits the format], while only the
> first 3 are required.

Well, just from what I've learned (the hard way I might add) if you
add the 4th "%d" on the the last line of values, you have to make sure
that (only if you're using Oasis I guess) you write out all 0's to that
field first. This is before you do any reading. If you implement the
read first, there won't be an integer to read. No errors, seems to work
fine. BUT, the value read from the 4th position in the line ablove is
still in memory. This will be used when you try to assign your read
integer to the var it's spposed to be. Hope this was understandable.
It probably wasn't. I'll try to reexplain it if I confused anyone.


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

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