Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

MultiSub (lines 3606-3622)

3606  !  The MultiSub routine deletes object "o" from the multiple-object-list.
3607  !
3608  !  It returns 0 if the object was there in the first place, and 9 (because
3609  !  this is the appropriate error number in Parser()) if it wasn't.
3610  ! ----------------------------------------------------------------------------
3611   
3612  [ MultiSub o i j k et;
3613      i = multiple_object-->0; et = 0;
3614      for (j=1 : j<=i : j++)
3615          if (o == multiple_object-->j) {
3616              for (k=j : k<=i : k++)
3617                  multiple_object-->k = multiple_object-->(k+1);
3618              multiple_object-->0 = --i;
3619              return et;
3620          }
3621      et = 9; return et;
3622  ];


Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.