Okay... since no one has seemed to get it right yet... :)
The 6 reserves six spaces for the variable to be displayed in. So if
the integer to be displayed id 1234 it gets printed out like " 1234".
If the int is 1 it is printed like " 1". All it is is formatting.
If you were to add a "-", so it looks like %-6d, 1234 would be printed
"1234 ", and 1 would be printed "1 ".
Thought I'd take a sec to clear that up.
throck
Jourge Fuzz Bush wrote:
>
> Um, I think it has something to do with the size of the int. Like say
> you want to display a long int it would be %ld so %6d might be 6 digits
> or something....... Or represent a short int.
>
> Del wrote:
> >
> > Julian Buckley wrote:
> > >
> > > > > 1162 sprintf(buf1, "%6d", mob_index[SHOP_KEEPER(shop_nr)].virtual);
> > > > >
+------------------------------------------------------------+
| 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