Command Reference

Return to Online Manual Contents

Basic Object Commands Create, Make, Shadow, Destroy/Delete, Describe, Duplicate, Grab, Drop, Store, Attach, Detach, Enter, Leave, Rename Object Animation Commands Become, Revert, Wake, Stop, Resume, Suspend, Kill, Sleep, Monitor, Execute, Tell, Reply, Run
System Commands Debug, Dump, Dumpvar, Memory, MemDump, Break Object Information Commands Look, Inventory, Map
Varible and Macro Commands Declare/Set, Macro, EndMacro, Vars, Label, Goto, Echo, FEcho, List, Methods Result, GetResult, Return, Stop, Compare, If/Else/Endif, Script, Push, Parse/Open, Endparse/Close, Option, Command, Endcommand, GetWord, GetLine, GetPartial, Head, Tail, UCase, LCase, PCase, Bound, Burst, Collapse, Setresult, Result, On Miscellaneous Commands Help/'?', '!', '.', ChangeDir/CD, Input, Wait, Increment, Decrement, Multiply, Divide, LAlign, RAlign, NoAlign

Basic Object Commands
/CREATE [object name]... For all parameters passed to the create command a seperate object is created. Each paramater passed to create is used as the new object's name. Objects are created within the currently controlled object. /MAKE [object_type] [object name] ... There are certain complex objects available, these are created using the make command. /MAKE with no parameters lists availble archetypes. The basic form is to /make [type (from archetype names)] [name] and if the parameters required are not specified, it's up to the archetype to result with information. (This was introduced to /make cards deck, which creates an object named deck with methods to /draw, /shuffle, ...) /SHADOW [object] .... Creates a reference to the real object. Theortically all operations done to the shadow in fact will reference the real object. However, the shadow has it's own presence (location/attachments). /DESTROY [object]...
/DELETE [object]... For all parameters passed to the destroy command objects are located and destroyed. If they were previously sentient, their controller is also deleted. Object are located near this, in this, on this, and then macros for the current object are checked. If an object contained other objects, all contained objects become contained in the container of the object. ( Deleting a book shelf would drop all the books into the library. Assuming the shelf still exists, deleting the pages would drop the words into the shelf. Since the covers are both attached to the binding, they would remain, but become detached from each other, however, if the binding were deleted, then the front cover, pages, and back cover would all become divorced. ) If the name specified is not an object name, but is a macro name, then the macro is deleted.
/DESCRIBE [what] [description]... Changes the description from nothing, to the set of tokens passed after the object name to describe. Objects are located in this, on this, near this, then macros of this object are checked. /DUPLICATE [object]... Locates the specified object first on, then in the current object. If the object is found, then the object is duplicated in all aspects. All objects within the object being duplicated are also duplicated. /GRAB [object]... Locates an object on, in, then near the currently controlled object. The object is moved from it's current location and becomes attached to the current object. /DROP [object]... Locates the specified objects on the current object (held by). The object is then put near the current object (placed in the containing object of the current object. /STORE [object]... Locates the specified objects on the current object (held by). The object is then put in the current object. /ATTACH [ [object] [to object] ]... Both objects must be held by the current object. The first object is then attached to the second object specified. Multiple pairs of objects may be specified. /DETACH [ [from object] [object] ]... The object to be detached from is specified first. The object must be held by the current object. The object to remove from the held object is specified second. After this is completed the current object will hold both objects seperated from each other. /ENTER [object]... For each object specified in the parameter list, the object is located near the current object. The currently controlled object will then move into the specified object. /LEAVE Moves the currently controlled object out of the current object it is in. If the current object is in "The Void", then leaving has no effect. /RENAME [object] [to_name] Renames an object to the new name......
Object Animation Commands
/BECOME [object] The user context becomes the controller of the specified object. /REVERT Similar to leave, the reversion commands saves having to know what the previously active object was, or for that matter where it was... /WAKE [object] Makes an inanimate object active. It may process macros on its own. Any command a user may issue may also be issued by the object. Therefore it may create, destroy, rename, or otherwise manipule other objects. All aware objects have a variable '%me'... which is the name of the object. /STOP Halts and terminated the currently executing macro. /RESUME Resumes the currently syspended macro (unless not suspended, then does nothing) /SUSPEND Halts the currently executing macro. /KILL - (To Be Implemented)
/SLEEP - (To Be Implemented)
/MONITOR [object] If the object is already sentient itself, then the user must use the context of the object's sentience.... (bad wording... ) /EXECUTE [Command Line]... The arguments passed to this may be variables, and therefore resolve to their real values. The command is then queued to the currently active object. /TELL [object] [Command line]... Similar to process, but the object specified must be in visible space. The command line parameters are substituted appropriately if they are variables, then the command is queued to the specified object. /REPLY [Command] This command only functions within a macro context. It /TELLs the object which invoked the macro, possibly itself, the command specified.
System Commands
/DEBUG off
Turns on and off the printing of the actively executing commands. If 'on' or 'off' are not specified, then the currently logging state is toggled. Logging only occurs for the current macro, not it's caller, nor for the macros it executes, unless those macros also turn on the debug tracing. If this command is issued outside of a macro, global tracing is turned on and ALL commands are logged.
/DUMP [object] Is supposed to dump verbose diagnostic information about objects.... /DUMPVAR [variable] Dumps verbose information about a variable. /MEMORY Returns the amount of free memory, used memory, number of free blocks, and the number of used blocks. /MEMDUMP Causes the memory system to issue OutputDebugStrings() for a system debug message logger to view. ( has such a thing) /BREAK (BAD) causes a hardware INT 3. This is the program execution breakpoint instruction. Upon executing this - the program can/will go away depending on your system configuration.
Object Information Commands
/LOOK [object] /LOOK in [object] Locates the object in visible space. The search is done first within the current object, then on, near, and then around the current. The object description, and items currently held by (attached to) are printed. /INVENTORY Prints all of the objects held by the current object, then prints all objects contained within the current object. /MAP
/MAP [object] (not fully implemented yet) Prints the heirarchy of objects in an indented tree format...
Varible and Macro Commands
/SET [varname] [zero or more atoms]
/SEt [IN [object]] [varname] [zero or more atoms]
/DECLARE [varname] [zero or more atoms]
/DECLARE [IN [object]] [varname] [zero or more atoms] creates a variable called [varname] which points to a string of atoms. Internally this command creates a text node which points to an indirect text node. The indirect text node points to the actual value of the line. Each indirect node must be assumed to only contain one atom... since this provides a way to use existing data without having to copy it.

If this statement is used within a macro it creates a local instance of the variable which is deleted when the macro exits. If this is used with outside of a macro the value is common to all macros which an object may use.

If the 'IN [object]' parameter is specified, the variable is declared for the specified object, not the current active object. If the object specified is not visible, an error message is generated.

/MACRO [name] [param-1] [param-2]...[param-N]
/MACRO [IN [object]] [name] [param-1] [param-2]...[param-N] variables passed to a macro have a different nature since the caller must provide all the parameters the list of names of parameters is parallel to the list of values passed to the macro.

If the 'IN [object]' parameter is specified, the macro is defined for the specified object, not the current active object. If the object specified is not visible, an error message is generated.

/MACRO [what] [expected parameters...] If the macro does not previously exist, and does not conflict with an internal command name, then all commands entered until /ENDMACRO are stored as the macro. No checking for parameter or variable validity is done. If the macro contains /macro commands, then a count of levels of /endmacro commands is kept until the final /endmacro is issued. Macros are created in the current object context only. Other objects cannot use the macros unless they /tell the object to perform the macro. Perhaps if they pass local variables or macro arguments the remote macro may perform a useful operation for the requestor - more than likely the macro should be copied to the object requesting its use. When a macro is defined, all commands are updated according to minimal significant characters make that command unique. (see /HELP) /VARS Lists all global variables, and also variables defined in the current macro context, with their associated values. /LABEL [mark name] Marks a spot in a macro which maybe be given to a /goto command. Only the first label of each name will be gone to - although multple lines maybe be /label'ed with the same name. Mark name may be a variable. /GOTO [label name] Resets the macro index to the beginning of the current macro, and searched forward until the first /label with the name matching the parameter to the goto is found. Label name may be a variable. /ECHO [token]...[token] Each token specified is displayed.... useful for printing out the values in current variables. Each line echoed will start on a new line, because ECHO will generate a newline BEFORE actually outputting the tokens. /FECHO [token]...[token] This command acts just like ECHO, however does NOT prefix lines with a newline. /LIST [macro] If a macro name is specified, then the macro is listed. If there is no name specified, then a list of macros which the current object is printed. If a parameter is specified, and it matches a name of a macro defined for this object, then the macro is listed. /METHODS Lists available methods on an object. Methods are typically only available on objects created with /make. However, opening certain devices may result in methods on the object. /ENDMACRO Terminates a macro defination. Also, when executed by a macro, acts as a /return statement. /RESULT [zero or more atoms] Sets the return value of the current macro to the atoms specified. /GETRESULT [variable] Gets the last result from a macro /RESULT command, and stores it in the variable reference specified. /RETURN Leaves the current macro and returns to the previous macro, or to an idle input state... /COMPARE [op1] is [op2]
/COMPARE [op1] like [op2]
/COMPARE [op1] is_tag
This command is used to set success or fail assuming an IF statement follows near by. The parameters to this command are op1 - a variable or a constant value, op2 - a variable or a constant value. The operands (1, 2) are assumed to be words... not strings (yet).

requires both op1 and op2
is - compares the two operands and sets success if they match length, and a case-sensitive match.
like - sets success if the operands match up to the length of the shorter with a case-insensitive match.
in - the first operator is a word, the second is a list, result is true if the word is in the list.
morethan - compares the numeric value of op1 and op2, if op1 is more than op2 then the result is true.
lessthan - compares the numeric value of op1 and op2, if op1 is more than op2 then the result is true.

requires only op1
is_tag - set success if the token was bound by < >.
is_... - to be determined... but other options will likely be is_paren, is_quoted, is_bracketed, is_braced.
is_device - test to see if [op1] is the name of a known device type.
blank - if only end of lines are present, or there is no content in the variable, it is blank.
eol - if the variable is an end of line record, result is true.
binary - if the data is binary, the result is true. number - if the content of [op1] resembles a number (+/-*[0-9][.]*[0-9])

requires no operands
connected - returns true if the file or tcp connection being processed is still open and connected.
active - returns true if the COMMAND data path is still connected.
is_console - returns true if the loader used is console mode.
/IF success
/IF fail
There are only two types of IF allowed - if FAIL or if SUCCESS. Many commands set success or failure when used in a macro. This allows the results to be tested. /grab for example returns failure if the object was not found.
/SCRIPT [scriptname] Attempts to open a file specified by script name, then parses the file and performs all commands specified therein. /PUSH [var] [token] Appends token to the end of the variable referenced in the first parameter.
/PARSE [devname] [device] [parameters...]
/OPEN [devname] [device] [parameters...]
Opens a data datapath on the currently executing sentience. <device> specifies a device name to open, and <parameters> are specific parameters for said device.
[devname] is a required parameter. It is some unique name for the device to be referenced as.  This name is used in close and option.
[device] is the type of the device to open.
For more information on devices please view device pages...
[parameters...] are optional parameters specific to each type of device.  These paramters are detailed on the device pages...
The object may step through data from the device currently being parsed using /getword, /getline, or /getpartial....
If not in a macro, data available from the device will automatically be relayed to the active command channel.
/OPTION [devname] [parameters...]
Options per device after the device is open, some parameters may be modified.  Also certain commands become available after a device has been opened, these can be accessed using the option command.  Often, but not always, "/option <devname> help" will list available options for the devices.
/ENDPARSE [devname]
/CLOSE [devname] Closes the current file specified being parsed.&nbps; If no device name is specified, then the first open file is closed. "/dump %me" lists devices currently open.
/COMMAND [device name] [device specific parameters] For more information on this command please view device pages... Basically command input is taken from the device specified.
Opens a command datapath on the currently executing sentience. <device> specifies a device name to open, and <parameters> are specific parameters for said device.
/ENDCOMMAND Closes the next command datapath device in the chain of command datapaths. /GETWORD [varname] This command demands that a variable name be used. The variable specified is set to the next value from the file opened by the last /parse command. /GETPARTIAL [varname] If /getword fails, then there might be a partial expression. This command gets the partial and puts it in a variable, clearing the partial accumulator. Useful for badly formatted files being parsed. /HEAD [varname] [into] [count] Takes the first word from [varname] and moves it to the variable [into]. If [count] is specified and is a positive number, this is the number of characters to get instead. If the number of characters requested is greater than the length of the first atom, the whole atom is moved. If only a part of the atom is to be gotten, the remainder is put back in front of [varname]. /TAIL [varname] [into] [count] Takes the last word from [varname] and moves it to the variable [into]. If [count] is specified and is a positive number, this is the number of characters from the end to get instead. If the number of characters requested is greater than the length of the last atom, the whole atom is moved. If only a part of the atom is to be gotten, the remainder is put back at the end of [varname]. /UCASE [variable] Uppercases the specified variable. /LCASE [variable] Lowercases the specified variable. /UCASE [variable] Changes the case to be proper, that is capitalize the first letter of every word. /BURST [variable] [destination] If no parameters are specified, burst will take the current 'macro result' (/setresult, /result) data and burst it and store the result back into the 'macro result'
If variable is specified without a destination, the data is queued into the data datapath as an input.
If a destionation NAME is specified, a variable named that is set.

ex: /decl temp "this is a thing to burst"
/burst %temp # results in data in the data datapath
/burst %temp out # results in a variable called 'out'

/result %temp # sets the 'macro result'
/burst # bursts the currently set macro result
/COLLAPSE [variable] If variable is specified, then collapse will take the tokens which make up the variable and collapse them into a single thing. By default MOST information within dekware is maintained as tokens.
If no variable is specified, then it attempts to use the current 'macro result' and collapse that back into itself.
/RESULT [text...] Sets an internal value to whatever tokens are passed as text. This value remains the same until some other command modifies it - some commands modify it, but mostly the only time it changes is with /setresult. /GETRESULT [variable name] Retrieves the last value set in the internal macro result variable, and puts it in the variable named variable. This command does NOT use a variable reference...

/result %temp # this is usually WRONG (unless temp contained the right varname)

/result temp # sets the macro result variable into 'temp'

/ON [behavior method] Begins recording of actions to perform when behavior actions are triggered. At some point there may be a command /before which behaves almost like this, but happens before the object actually changes its location. When the macro is called the parameter %caller may be used to reference the object which has triggered the event. %me will reference the object which has received the trigger.

Behaviors are as follows

  • Enter - triggered on the object entered when /enter command is used.
  • Leave - triggers on room you are in when /leave command is used.
    Partially implemented behaviors (untested)

  • Grab - triggered on object which is grabbed
  • Pull - triggered on previous container of grabbed object
  • Receive - triggered on object which now possesses the grabbed item.
    To be implemented behaviors (designed)

  • conceal - triggered on room containing object which has (/enter'ed) a container.
  • reveal - triggered on new room when an object leaves a container.
  • Store - triggered on object which is stored
  • Push - triggered on container which receives the stored item.
  • Loss - triggered on entity which previously possessed stored item.
  • Drop - triggered on entity dropped.
  • Loss2 - triggered on room receiving the dropped object.
  • Attach - triggered on both items being attached (?)
  • detach - triggered on both items being seperated (?)
  • enter near - triggered on new room receiving an object... This happens when entering a room which is attached to the previous room. /Enter also works for traversing attached objects.
  • leave near - triggered on room which an object has left... this happens when leaving a room which is attached to the previous...
  • Miscellaneous Commands
    /HELP [commands like...] Shows a list of commands, and if the command has a description, also displays the description. Macros become part of this list. The amount of characters required to match the command are bracketed. More characters than required to match may be entered, but they must match the command also.... If a parameter is given to HELP, only the commands which resemble the word entered are shown. ! [command line] Launches a system command using the current command stream. This works for most commands, however, FTP under windows does not use standard input to read the password... so this application will just hang. Most applications will run, but the object processing this command will be halted until the command completes. Simple commands like !dir, !ping, etc. will work well. . [command to send...] Period(.) will send the line to the current data channel after substituting variables on the line. The period itself will not be sent. Currently the only devices which support this command well are TCP, UDP, TCPSERVER, and UDPSERVER. Other devices such as 'file' do not yet support output methods, being primarily used to read and parse files. If connected to another Dek via a network connection, this allows commands to be sent through to the next Dek. "./help" will get help from the remove Dek instead of the local. This command is also useful for Unix systems where "./configure" might be run, one can use the command "../configure" to work on the remote system. If nothing is put after the period a blank line is generated to the remote connection. If the data path is not open on the object, this will have no action. /CHANGEDIR [directory]
    /CD [directory] Changes the current working directory to the specified path. If used within a macro success/fail is set.
    /INPUT [variable] Gets the next command line entered, or queued by a TELL to the active object, and stores it in the variable referenced. Macro execution is halted until the input is satisfied. /WAIT Wait until there is data on the input data channel. See sentients for more information on channels. /INCREMENT [variable] [amount] Adds value to the variable, assuming the variable is numeric in content. /DECREMENT [variable] [amount] Subtracts value to the variable, assuming the variable is numeric in content. /MULTIPLY [variable] [amount] Multiplies the value of the variable, assuming the variable is numeric in content. /DIVIDE [variable] [amount] Divides the value of the variable, assuming the variable is numeric in content. /LALIGN [variable] Sets the output alignment to the left... for more on alignment see Parsing. /RALIGN [variable] Sets the output alignment to the right... for more on alignment see Parsing. /NOALIGN [variable] Sets the output alignment to none... for more on alignment see Parsing.