Index: class.doc ================================================================== --- class.doc +++ class.doc @@ -420,16 +420,21 @@ standard message names have no prefix. * Object: A reference to an object. There are no literals of this type. * String: A string in quotation marks. There are no string manipulation -functions; the only thing that can be done with a string is to display it. +functions; the only thing that can be done with a string is to display it, +or to compare if one string matches another. * Sound: A named sound effect. Values of this type cannot be compared with anything, even other values of the same type. * Mark: There is only one value of this type. + +* Array: A reference to an array. You cannot allocate arrays at run time; +the available array memory is fixed at compile time, subject to the global +array definitions. Some things are not their own types, and are other uses of numbers: * Null: A null class or null object is represented as zero. @@ -1069,10 +1074,13 @@ Test if first input is greater or equal to second input (unsigned). ,ge ( in1 in2 -- bool ) Test if first input is greater or equal to second input (signed). +GetArray ( array row column -- value ) + Read a value from an array. Coordinates are zero-based. + GetInventory ( class image -- value true | false ) Read from the inventory, with true if it exists or false if not. gt ( in1 in2 -- bool ) Test if first input is greater than second input (unsigned). @@ -1095,10 +1103,13 @@ in ( x mark ... - bool ) Check if x is equal to any of the values above the mark; equality is tested the same as the "eq" instruction. +InitArray ( array value -- ) ** + Fill all cells of an array with the specified value. + IntMove ( dir -- bool ) ** Similar to Move but do not initialize Inertia at all; use the current value of Inertia instead. ,IntMove ( obj dir -- bool ) ** @@ -1364,10 +1375,13 @@ Similar to ,SendEx but this object sends the message to itself. ,SendEx ( obj message arg1 arg2 arg3 -- value ) Send a message to the specified object. +SetArray ( array row column value -- ) ** + Write a value to an array. Coordinates are zero-based. + SetInventory ( class image value -- ) ** Sets an inventory item with the specified class and image number to the specified value (which must be a number). If there is no inventory item with that exact class and image, an inventory item will be added, otherwise the existing one is updated to the new value. Inventory values