Iptscrae Language ReferenceThis section is a reference to the Iptscrae language: Iptscrae possesses over 100 specialized commands and keywords, as well as its own versions of many commonly-used operators and functions; each of these represents a wide range of interactive possibilities awaiting your imagination.Top ^ Data typesThe Palace is integer-based (meaning that it works in terms of whole numbers), but barring floating-point variables, the software can handle all basic data types: symbols (variables), numbers(integers), strings(string literals), atomlists(subroutines) and arrays, as well as a number of special-case symbols and reserved keywords. Top ^ Event handlersEvents are the basic stimuli of the server, representing all the things your Palace can "watch for" and respond to. They include significant user actions such as entering and leaving rooms, clicking on doors and spots, talking and other basic activities, plus a special type of event called an alarm. Top ^ Commands and functionsNow that you know where scripts can be placed and what events they can react to, you'll probably want to know what kinds of things you can make them do. You can add action to your scripts by using the commandsand functionsdescribed in this section. SETFACE
This commands sets the user's face to one of the 13 built-in faces (props are not removed, however). The specified number must be an integer from 0 to 12.
Example
SETPOS
This command immediately moves the user to position x
y in the Viewing Area. x must
be an integer from 0 to 511. y must
be an integer from 0 to 383.
Example
SETPROPS
This command acts like a macro, causing the user to immediately
don all props listed in [ propArray ]. Props
may be listed either by Name or by ID#
Example
Like all arrays, [ propArray ]
must be enclosed in square brackets ( [ ]
). Also, prop names, being strings, must be enclosed in double quotes
(").
SOUND
This command plays the sound file filename.
Sounds are WAV files, saved without the
.WAV extension, and reside on the client in \Palace\Media\YourPalaceName\Sounds.
Example 1 (play specified sound)
Example 2 (play random sound)
SUSRMSG
This command generates a message that all owners and operators will
see, no matter where they are on the server. Use it sparingly.
Example
TOPPROP
This function returns the propID of
the last prop the user put on. If the user is "naked" it returns 0 (zero).
The following example shows you how to scatter all your currently-worn
props.
Example
USERNAME
This function returns the user's User Name
as specified in the Preferences dialog. You can't change
a user name from a script.
Example
USERPROP
This function returns the propID of
one of the props currently worn by the user. number
is a number from 0 to 8 indicating which prop you want to identify (note
that this refers to the order they were donned in, not necessarily
the order they appear in). You can determine the number of props
currently worn by using the NBRUSERPROPS command,
as illustrated in the following example.
Example
WHOCHAT
This function returns the userID of
the user who invoked an INCHAT event.
Example
WHOME
This function returns the user's own userID.
Example
WHONAME
This function returns the User Name of
the specified user. Note that to get userID it
is necessary to use one of the following commands: ROOMUSER, WHOCHAT, WHOME
or WHOTARGET. The following example causes
you to say the name of room user 0 (zero) in the current room (that's you,
if you're the only person in the room at the moment!)
Example
WHOPOS
This function (in either of its forms) returns the current
x,y position of the user. Note that
x is placed on the stack before y,
which means that y is ready to be retrieved from the stack first. To reverse
their positions so they can be used in their typical order (X, then Y),
use the SWAP function.
Example
WHOTARGET
This function pushes the userIDof the person you have selected for private chat (i.e., Whisper Mode or ESP) or zero if you have not selected a target. Example
Top ^ Spot commands and functionsDOORIDX
This function returns the IDof the door indicated by number. The following example causes the user to leave through a random door:
Example
Related functions
GETSPOTSTATE
This function returns the current state of the specified hotspot or door. The following example uses NBRSPOTS and SPOTIDX as well as GETSPOTSTATE to determine the state of a random door or spot in the current room.
Example
ISLOCKED
This function returns a 1 if the indicated door is locked, otherwise it returns a 0. The following example uses NBRDOORS and DOORIDX to determine the state of a randomly-selected door in the current room.
Example
LOCK
This command is used by deadbolts (or doorknobs) to lock doors. Its counterpart is the UNLOCK command. The following example assumes there is a lockable door with an ID of 1 in the current room.
Example
ME
When a spot or door is executing the script, this function pushes its ID.
Example
NBRDOORS
This function returns the number of doors in the room. This number may be less than or equal to the number returned by NBRSPOTS (because all doors are spots, but not all spots are doors).
Related commands
Example
NBRSPOTS
This function returns the number of spots (including doors) in the room.
Example
SELECT
This command "clicks" the spot specified by spotID. If the spot has an ON SELECT handler, the script will be executed just as though the user had selected it physically. The following example assumes there is a spot with an ID of 1 in the current room. To see it work, put an ON SELECT handler in this spot that does something noticeable.
Example
SETALARM
This command is used to schedule an ALARM event in the future. It can be used to create animations and other interesting activity. The user's subjective duration of a "tick" depends on the speed of both the client and server as well as the network load at the moment, but is about 1/60th of a second. The following example assumes there is a spot with an ID of 1 in the current room. To see it work, put an ON ALARM handler in this spot that does something noticeable (see Handlers earlier in this document).
Example
SETLOC
This command is used to move a spot or door, relative to its current position. It is functionally equivalent to selecting the spot or door while in authoring mode and dragging it to the new position. Note that this command is only accessible to owners and operators; i.e. it will not be executed unless the user is in owners or operator mode. For this reason, it is much more useful as an authoring command than as a scripted command. The following example assumes that you are in owners or operator mode, and that there is a spot with an ID of 1 in the current room.
Example
SETPICLOC
This command is used to change the x and y offsets of a picture associated with spot spotID (these are the second and third numbers in the "triplets" appearing between PICTS and ENDPICTS). Note that only a single picture is affected, corresponding to the current state of the spot -- any pictures associated with other states of the same spot will remain unchanged. Note also that this command is only accessible to owners and operators; i.e., it will not be executed unless the user is in owners or operator mode. For this reason, it is much more useful as an authoring command than as a scripted command. In fact, the SETPICLOC command provides the only way to change a picture's offset without editing the server script, and this makes it very useful for "fine-tuning" the placement of a particularly tricky graphic. The following example assumes that you are in owners or operator mode, and that there is a spot with an ID of 1 (and at least one picture) in the current room.
Example
To see this command in action, launch the Palace server using the "Mansion" script and try this simple experiment:
SETSPOTSTATE
This command changes the state of a spot for all users currently in the room. For multi-state hotspots, this can be used to create animation effects. The following example assumes that the current room contains a spot with an ID of 3 which possesses three states (0, 1 and 2); the script will advance the spot to the next of these three states by using an IFELSE command. Try executing it several times in a row.
Example
SETSPOTSTATELOCAL
This command functions just like SETSPOTSTATE, except that only the person executing the script will actually see the new state occur. Because this command does its work locally (i.e., on the client computer only), it changes the spot's state much more quickly than the non-local version. For this reason, this is the preferred way to do animations and effects that don't need to sync up exactly for all users. The following example assumes that the current room contains a spot with an ID of 3 that possesses three states (0, 1 and 2). The difference between this example and the preceding one (SETSPOTSTATE) is that in this case, the user who executes the script will be the only one who sees the spot change.
Example
SHOWLOOSEPROPS
This command creates a list in the Log Window, providing the propID and location of all loose props in the room. This is useful, for example, if you want to write a script that automatically places chess pieces on a chess board: In authoring mode, determining the exact X and Y positions to place all these props by hand would be a tedious task. Instead of doing this the hard way, you can simply place the props in the desired positions on the screen, type /SHOWLOOSEPROPS into the client input box, and copy the listing from the Log Window. This command may also be executed from within a script. The listing in the Log Window will follow the format shown below: 1009 188 120 ADDLOOSEPROP
Example
SPOTDEST
This function returns the DEST (destination) of the spot or door specified by spotID. Note that Normal spots may possess DEST fields, although unlike Passages, they require a scripted GOTOROOM in the ONSELECT handler to send the user there when selected. The following example assumes that the current room contains a door with an ID of 1, for which a DEST has been set:
Example
NOTE: You might find it odd that a normal spot can contain a DEST it doesn't use, but consider this: if you place an integer value into a spot's DEST field (which may require editing the server script manually), you can then use SPOTDEST to refer to it, effectively providing a "room-level constant" (and you can do this for each normal spot in the room). Palace designers are always looking for places to store data without using globals or incurring too much memory overhead; this is one of 'em. SPOTNAME
This function returns the name of the spot (or door) specified by spotID. The following example assumes that there is a spot (or door) with an ID of 1 in the current room, and that it has a name. The following example determines the names of all spots in the current room, and prints its output to the Log Window.
Example
SPOTIDX
This function returns the spotID of the spot specified by number. The following example determines the IDs of all spots in the current room, and prints its output to the Log Window.
Example
UNLOCK
This command is used by Deadbolts (BOLT commands) to unlock doors. Its counterpart is the LOCK command. The following example assumes that there is a lockable door with an ID of 1 in the current room.
Example
Top ^ Paint commands and functionsPaint Commands always operate in the foreground layer of the Viewing Area; that is to say, "in front of" all graphics in the midground layer.LINE
This command draws a line from point x1,y1 to point x2,y2. The line is drawn in the current PENSIZE and PENCOLOR. The following example draws a line from the upper left corner of the Palace client viewing area to the user who triggered it.
Example
LINETO
This command draws a line from the current PENPOS to a point x,y away from the current PENPOS. The line is drawn in the current PENSIZE and PENCOLOR. The following example draws a diagonal line that goes 100 pixels to the right and 50 pixels upward, starting from the pen's current position.
Example
PAINTCLEAR
This command erases all painting/drawing from the screen, regardless of who put it there. You can do the same thing by double-clicking on the Detonator in the Painting Window.
Example
PAINTUNDO
This command erases the last painting/drawing command or action performed. You can do the same thing by clicking once on the Detonator in the Painting Window.
Example
PENBACK
This command moves the pen to the "back" of the foreground layer: any painting commands or actions subsequently performed will appear behind all avatars in the room (but they'll still be in front of any graphics in the midground layer). Any paint already on the screen is not affected. Note that you can do the same thing by clicking on the Layerer in the Painting Window.
Example
PENCOLOR
This command sets the color of the pen: any painting commands or actions subsequently performed will appear in the specified color. You can do the same thing with the Palette in the Painting Window. The three arguments r, g and b represent the relative amounts of red, green and blue in the color, on a scale of 0 to 255 (where 0 0 0 yields black and 255 255 255 yields white). The following example sets the pen color randomly.
Example
PENFRONT
This command moves the pen to the "front" of the foreground layer: any painting commands or actions subsequently performed will appear in front of all avatars in the room (in the closest possible position to the user's face). Paint already on the screen is not affected. You can do the same thing by clicking on the Layerer in the Painting Window.
Example
PENPOS
This command moves the pen to position x y on the screen, without drawing anything. The following example moves the pen to the user's position.
Example
PENSIZE
This command sets the pixel width of all lines drawn by the pen to number (an integer from 1 to 9): any painting commands or actions subsequently performed will create lines of this width. Paint already on the screen is not affected. You can do the same thing with the Line Sizer in the Painting Window. The following example paints a gradually-widening line across the Viewing Area.
Example
PENTO
This command moves the pen to a position x y relative to the current PENPOS, without drawing anything. The following example draws a line 100 pixels long, moves the pen via PENTO, and continues drawing.
Example
Top ^ Sound commands and functionsPrior to version 2.0 of the Palace client, audio files could not be sent across the network. For WAV or MIDI files to be heard, they had to exist on the user's hard disk, in the Sounds folder. A few users are still running around with this limitation, and sounds should therefore be made available via a Web Page, public FTP directory, or some other means.
Version 2.0 and greater allows clients to receive sounds as downloads
from the server. To be sent out, the audio files in question must be placed
in the Pictures folder on the server's computer.
MIDIPLAY
This command causes the MIDI file "fileName" to be played. The following example assumes that there is a MIDI file called "testme.mid" in the /Palace/Media/YourPalaceName/Sounds folder.
Example
MIDILOOP
This command causes the MIDI file "fileName" to be played. The following example assumes that there is a MIDI file called "testme.mid" in the /Palace/Media/YourPalaceName/Sounds folder. Also, by using TRUE instead of a number, you can loop a midi infinitly!
Example
TRUE "testme.mid" MIDILOOP MIDISTOP
This command causes the currently-playing MIDI file to immediately stop. (PC only)
Example
SOUND
This command causes the file "fileName" to be played for all users in the room. It is functionally identical to typing ")filename" SAY into the Input Box.
Example
"Song.midi" SOUND Top ^ Flow commands and functionsALARMEXEC
This command schedules an atomlist to be executed at a pre-specified time (after so many "ticks" have elapsed). The user's subjective duration of a "tick" depends on the speed of both the client and server as well as network load at the moment, but is considered to be 1/60th of a second. The following example waits ten seconds before finishing.
Example
BREAK
This command breaks out of a WHILE or FOREACH loop. The following example sets up a FOREACH loop causing a sentence to be spoken one word at a time, but halts after the fourth word due to a BREAK command.
Example
EXEC
This command executes an atomlist. It can be used in combination with the DEF command (see below) to execute a "user-defined function." Note that unless the function was defined in the same handler, it must be made GLOBAL.
Example
EXIT
This command stops the currently-running script. It is useful for breaking out of looping errors that might otherwise flood the server or lock up the client. The following example bounces you around the screen randomly. It would continue to do so forever, except for the imbedded EXIT command.
The following script is likely get you killed for flooding if a death
penalty exists on the server where it is executed. It is recommended that
you turn the death penalty for flooding OFF before attempting to use this
script.
Example
FOREACH
This command executes atomlist once for each item in array. Before executing the atomlist, each item in the array is pushed onto the stack. The atomlist should be something that pops these items off the stack and does something with them, as the following example indicates.
Example
IF
This command can be used to create a conditional statement: if the condition evaluates to TRUE (non-zero), atomlist will be executed. If the condition evaluates to FALSE ("0") it will not. Any operator (or logical series of operators) may be used to describe the condition being checked for (see the Operators section). The following example rolls a pair of imaginary dice, looking for a lucky total of 7.
Example
IFELSE
This command can be used to create mutually-exclusive conditional statements: if the condition evaluates to TRUE (non-zero), the trueatomlist will be executed. Otherwise, the falseatomlist will be executed. Warning: a very common Iptscrae bug is to use IF when you really mean IFELSE. The following example randomly determines two numbers from 1 to 100 and compares them.
Example
RETURN
This command breaks out of an atomlist.
Example
SETALARM
This command schedules the ALARM event for the spot spotID; this event will occur futureTicks in the future. A "tick" is 1/60th of a second. The following example assumes that there is a spot with an ID of 1 in the current room, and that this spot possesses an ON ALARM handler. When executed, the code will cause the spot's ON ALARM handler to be triggered ten seconds later.
Example
WHILE
This command creates a loop in which atomlist will continue iterating until condition evaluates to TRUE (non-zero). Any operator (or logical series of operators) may be used to describe the condition being checked for. The following example will continue counting until tempVar equals 5.
Example
Top ^ General commands and functions; <comment>
A semicolon (;) at the beginning of a line tells the program to ignore everything up to the next carriage return; it is used to insert comments into your scripts. Commenting your code is considered good programming practice in general, and comes in especially handy when you return to a script you haven't looked at in a long time. Note that comments placed outside of the script proper (i.e. outside of the SCRIPT... ENDSCRIPT block) will not be saved by the server.
Example
ADDLOOSEPROP
This command adds a loose prop to the Viewing Area. The prop can be specified by propID or by propName. In the first case (propID), you must either know the propID already or use a command to retrieve it (TOPPROP or USERPROP will accomplish this). In the second case (propName), remember to place the name of the prop in quotes. Note that the prop specified must exist in either the client's propfile or the server's propfile; otherwise the command will have no effect.
Example 1 (by propName)
Example 2 (by propID)
Example 3 (duplicating a worn prop)
ARRAY
This command creates an array containing number elements. This array will contain zeros when first created. Data may be stored via the PUT command. The following example creates an empty array of ten elements and names it "myArray."
Example
ATOI
This function ("Ascii TO Integer") converts a character string to a number. Strings - even numerals spoken as text strings -- must be converted to integers before you can do math with them. The following example causes any integer spoken (all by itself) to be multiplied by ten before it appears in the user's cartoon balloon.
Related commands
Example
BEEP
This commands causes the system beep sound to be heard on the user's computer. The following example causes this sound to be heard whenever the user says "beep" (even if it's imbedded in another word, or capitalized).
Example
CLEARLOOSEPROPS
This command clears all loose props from the room. The following example clears the room of loose props whenever the user says "be gone" (without the quotes).
Example
CLIENTTYPE
This command pushes "WINDOWS32", "MAC68K", "MACPPC", "TPV", or "unknown" onto the stack, depending on which client is running the script. The following example tells the user which client he/she is using whenever the user asks "which client".
Example
DATETIME
This function returns the number of seconds that have passed since January 1st, 1970 (Pacific Standard Time). Translating this number to a Julian date is left as an exercise for the reader (it's tough, but quite do-able).
Example
DEF
This command is used to create your own custom functions. Note that symbol must be declared GLOBAL if you want it to be recognized by any event handlers other than the one it's defined in; it will also have to be declared GLOBAL there (i.e., in the other handlers). As long as you adhere to this rule, your function can be executed in any room in your Palace.
Example 1 (defined and executed within the same handler)
Example 2 (defined ON ENTER, executed ON SELECT)
ON SELECT {
DELAY
This command causes a delay affecting all activity on the client -- events, alarms, queued commands and even prop animations -- for the duration specified by number. Delay times are measured in ticks (1/60 of a second) Note that SETALARM and ALARMEXEC are preferred since they don't lock up all processes on the client, although use of the DELAY command might be appropriate in a game, or as a penalty for breaking some house rule. The following example suggests one possible use:
Example
DIMROOM
This command allows you to "dim the lights" in the room, decreasing the luminance of all visible graphics and props. The natural state of a room is 100% lit. By specifying an integer (number) lower than 100 and higher than 0, you can set the lighting to any desired percentage. Note that if number equals 100 or 0 (zero), the room will be made 100% lit again. The following example fades the lights down and then brings them back up again.
Example
DUP
This command duplicates the top element on the stack. The following example shows an easy way to multiply an expression by itself; in this case, ( x + 1 ) * ( x + 1 ).
Example
GET
This function gets item number index from array. Note that the elements of an array are numbered from 0 (zero) to (number of elements minus 1). The array may be specified directly (element by element) or by reference to its symbol (name).
Related commands
Example 1 (referring to array directly)
Example 2 (referring to array by its Symbol)
GLOBAL
This command declares symbol as a global variable, which allows it to be shared among event handlers. The GLOBAL command must used in EVERY event handler and ALARMEXEC in which the global symbol is used, even in the same room. It is good practice to declare your globals as soon as you enter the handler in which they will be used; this makes it easy to remember which ones you need and what you were doing.
Example
About nested globals. GLOBAL is an executable command. After it is executed, the variable will operate as a global value for the rest of the script.
For non-programmers, the following examples should make all of this
a bit more clear; compare the level of indentation at which the
myGlobal GLOBAL statement appears in each example.
Example 1 (this works):
Example 2 (this doesn't):
GREPSTR
This function performs a case-sensitive search for the specified pattern within the specified string, and returns true (1) if the pattern is found. It may be placed in the INCHAT or OUTCHAT handler to operate directly on CHATSTR. Note that this command uses UNIX grep-style syntax; i.e., any character matches itself, unless it is one of the following special characters:
Special GREPSTR Characters
Example 1 (using IF to check for existence of string)
Example 2 (using WHILE to check for all instances
of string )
NOTE: These examples use the special Symbols $1 and $2, allowing the GREPSUB command to use the text picked up by the wildcards (.*) in theGREPSTRcommand. Up to nine such symbols may be used in a singleGREPSTR-GREPSUB structure ($1 through $9). For more information on regular expressions in general, see Mastering Regular Expressions by Jeffrey Friedl. Copyright 1997, O'Reilly and Associates GREPSUB
This function is executed in conjunction with a GREPSTR command: it locates specified spaces within a string, and fills them with any text that was "captured" by the GREPSTR. The replacement pattern uses the special Symbols $1 through $9 to refer to these captured character strings.
Example (the "Elmer Fudd" script from "The Moor"):
IPTVERSION
This command pushes the current Iptscrae version number (currently 1) into the stack. The following example would tell another user which version of Iptscrae you are currently using.
Example
ITOA
This function ("Integer TO Ascii") takes a numeric variable from the top of the stack, converts it to a character string, and places it back on the stack. Numerals must be converted to character strings before you can text-based commands (such as SAY) on them. For instance, WHOME SAY fails, since the WHOME function puts an integer (your userID) on the stack, while the SAY command is looking for a character string. The example below shows how you can use ITOA to remedy this.
Example
Related commands
LAUNCHAPP
This command tells the Palace software to look for the program called appName in the user's PlugIns folder, and launch it. It is used to launch Palace-compatible games and other software known as "Palace Plugins." The PalacePresents Viewer, which is distributed with the Palace User Software client, is a good example. Note that the full name of the program must be used (including file extensions, if any exist). The full path does not need to be specified, as this command applies to the Plugins folder only.
Example
LENGTH
This function returns the number of elements in array. The array may be specified directly (element by element) or by reference to its symbol (name).
Example 1 (referring to array directly)
Example 2 (referring to array by its Symbol)
LOGMSG
This command causes message to appear in the user's Log Window. Like CHAT, SAY and other message-related commands, it deals with character strings rather than integers. This command is primarily useful for debugging, since many users keep their Log Windows closed (guests and new users may be completely unaware that this window exists at all).
Example
LOWERCASE
This function converts a character string to lowercase.
Example
MOUSEPOS
This function returns the current X (horizontal) and Y (vertical) coordinates of the cursor. The X coordinate is put on the stack first, then the Y coordinate; they must be retrieved separately. This means you'll need two ITOA commands to get the mouse position, not just one. If you want get them in the traditional order (X, then Y), issue a SWAP command before getting them from the stack. The example below shows how to do this, sending the output to the Log Window.
Example
OVER
This command is the same as 1 PICK. See the PICK command below for a full description. PICK
The command n Pick reaches down n stack items and copies that item to the top of the stack. O PICK is the same as DUP, and 1 PICK is the same as OVER. POP
This command pops the top element off the stack and discards it.
Example
PUT
This command is used to put a data element into an array, in the position indicated by index. If the data is a string (as opposed to an integer), it must be encased in double quotes. Note that the elements of an array are numbered from 0 (zero) to (number of elements minus 1). The following example creates an array of letters, places the word "foo" in a random position within it, and prints the results in the Log Window.
Related commands
Example
RANDOM
This function puts a random integer on the stack, from 0 to (number minus 1). The following example shows you how to roll a die (i.e., how to generate a random integer from 1 to 6):
Example
ROOMID
This function returns the ID of the current room (as an integer).
Example
ROOMNAME
This function returns the name of the current room.
Example
SAYAT
This command causes message to appear as though it was spoken from position x,y. This is also known as "spoofing."
Example
SERVERNAME
This is the name of the server as specified in the Server Preferences dialog. You can't change the servername from a script.
Example
STACKDEPTH
This command pushes the number of items on the stack to the top of the stack. STATUSMSG
This command causes message to be displayed in the status bar (just above the Input Box) on the Macintosh and Windows clients. On The Palace Viewer, this command causes message to be displayed in the center of the Grapic window. It can be annoying; use it sparingly.
Example
STRINDEX
This command pushes the offset of the string "sp" in "str" or pushes -1 if "sp" does not appear in "str". STRLEN
This command pushes the length of the string to the top of the stack. STRTOATOM
This command turns a character string into an executable atomlist.
Example
SUBSTR
This function searches string for stringpattern (not case-sensitive) and returns 1 if it is found; otherwise it returns a 0.
Example
SUBSTRING
This command pushes the substring of "str" at offset off for length len. Negative values of len mean the rest of the string at offset off. Negative values of offset are an error. The example below says "I like roses".
Example
"I like violets" 0 7 SUBSTRING "roses" & SAY
SWAP
This command swaps the top two elements on the stack.
Example
TICKS
This function returns the current time (on the client) in ticks. The user's subjective duration of a "tick" depends on the speed of both the client and server as well as the network load at the moment, but is considered to be about 1/60th of a second.
Example
TOPTYPE
This command pushes a number indicating the type of the top item on the stack (the top item remains on the stack). The codes are
0 - Internal Error/unknown/stack empty 1 - number 2 - symbol (variable name) 3 - AtomList 4 - String 5 - ArrayMark (a [ character) 6 - Arrayuppercase UPPERCASE
This function converts string to uppercase. The following example causes everything to be spoken that way (in Cyborg.IPT it will operate on everything the user says; in a room script it will operate on everything said by anyone in the room).
Example
VARTYPE
This command is like TOPTYPE, unless the top item on the stack is a symbol (variable). If the top item is a symbol, the type of the current value of the variable is pushed. For variable types, see TOPTYPE on page 80
WHOPOS
This function (in either of its forms) returns the x,y position of the user specified. The following example causes the user to speak his/her coordinates.
Example
Top ^ OperatorsOperators are functions that perform traditional mathematical and logical operations. If you want to add, subtract, multiply, divide, or perform higher math tricks, you'll need these. You'll also need to use operators for setting and comparing the values of symbolsand other data; the most commonly-used operators are "equal" ( == ) and "let equal" ( = ). All operators make use of the stack, where they deposit the results of their calculations. |