Re: array question

From: Brian Williams - Nashak (bmw@EFN.ORG)
Date: 10/04/97


On Sat, 4 Oct 1997, Andrew Helm wrote:
> SNIP

Okay, what I mean is.. I have an array in the pfile.. int memorized[100];
which stores spellnums, if they forget a spell, I want it to set the
spellnum to 0, and if there is a 0 in the array, I want it to move all
entries to the left one after the zero, so there are no more zeros until
the end of the array
i.e.
1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 5
would equal this:
1, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

       /-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=X=-=-=-=-=-=-=-=-=-=-=-\
       |  Brian M. Williams          | 02/02/83 | bmw@efn.org          |
       X=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=X
       | Boccob the Uncaring, Lord of All Magic | Nashak Stonehand     |
       | accolademud.hermesnet.net 5000         | coyote.toon.org 6000 |
       \=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X-=-=-=-=-=-=-=-=-=-=-=/


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