SwiftForth-2 Glossary

GET TEXT
 
!+   !NOW   !REL   !TIME&DATE   #STRANDS   #USER   'MAIN   'MONITOR   (.)   (DATE)   (P)   (SFDATE)   (TIME)   (WID-CREATE)   (WINLONGDATE)   (WINSHORTDATE)   ++   +PROGRESS   +SMUDGE   +TO   +USER   ,"   ,REL   ,U"   ,Z"   ,Z\"   ,\"   -?   -PROGRESS   -SMUDGE   .DATE   .DLLS   .IMPORTS   .PROGRESS   .SPART   .TIME   /FSTACK   1/N   3DROP   3DUP   :PRUNE   <LINK   >CODE   >LINK   >NAME   >PRINT   >THROW   >f   >fs   ?FSTACK   ?PRUNE   ?PRUNED   @+   @DATE   @NOW   @REL   @TIME   ACTIVATE   APPEND   AS   BINARY   BODY>   CALLS   CHECKITEM   CIMPORT:   CODE>   CONFIG:   COS   COT   COUNTER   CSC   C\"   C]   D/M/Y   DASM   DATE   DDE-END   DDE-INIT   DDE-REQ   DDE-SEND   DF+!   DFCONSTANT   DFI@   DFLITERAL   DFVARIABLE   DPL   DefaultClass   DefineClass   EAGER/LAZY   EDIT   EMPTY   END-CODE   ENG   ENUM   ENUM4   EXPIRED   EXPORT:   F+!   F,   F.R   F2*   F2/   F2DUP   F>S   F?DUP   FI!   FI@   FILITERAL   FIX   FL,   FLITERAL   FS,   FWITHIN   GET   GILD   GRAYITEM   HALT   HILO   HIS   HIWORD   HOURS   HWND   ICODE   IDUMP   IMPORT:   INCLUDE   ITEM   KILL   KNOWN-VKEYS   L   LABEL   LIBRARY   LMATRIX   LMD   LOCALS|   LOCATE   LOHI   LOWORD   LPARAM   M/D/Y   MAKE-FLOOR   MAKE-ROUND   MEM   MENUITEM   MONITOR   MS   MSG   N.   NAME>   NEXT-WORD   NH   NOW   NUMBER   NUMBER?   OCTAL   OFF   ON   PAUSE   PERSONALITY   PLACE   POPPATH   PROGRAM   PROGRESS-NAME   PROGRESS-TEXT   PUSHPATH   RELEASE   REMEMBER   RESUME   RUNS   S>F   SBLEFT   SBRIGHT   SCI   SEC   SEE   SEPARATOR   SERVER   SF+!   SFCONSTANT   SFI@   SFLITERAL   SFVARIABLE   SILENT   SIN   SMATRIX   SMD   STARTER   STOP   STRING,   SUSPEND   SWITCH]   S\"   Sleep   TAN   TASK   TERMINATE   TIME   TIMER   TOPIC   U"   UBETWEEN   UNCALLED   U\"   VERBOSE   WARNING   WATCH   WH   WHERE   WINERROR   WPARAM   Z"   ZAPPEND   ZERO   ZPLACE   Z\"   [+ASSEMBLER]   [+FORTH]   [+SWITCH   [C   [MENU   [POPUP   [PREVIOUS]   [SWITCH   _PARAM_4,   _PARAM_5,   _PARAM_6,   _PARAM_7   f>   fs>   uCOUNTER   uTIMER   {   ~!+  
!+                  ( addr x -- addr+4 )
Write the value x to addr, and increment the address by one cell.
!NOW                ( ud u -- )
Take the same parameters as those returned by @NOW and set the system time and date.
!REL                ( addr_1 addr_2 -- )
Store the absolute address addr_1 in addr_2, having first converted it to a relative address.
!TIME&DATE          ( u1 u2 u3 u4 u5 u6 -- )
Convert the stack arguments u1 seconds (0..59), u2 minutes (0..59), u3 hours (0..23), u4 day (1..31), u5 month (1..12), u6 year (1900..2079) to internal form and store them as the system date and time.
#STRANDS            ( -- addr )
Variable containing the number of strands in a wordlist.
Its default value is 31.
#USER               ( -- n )
Return the number of bytes currently allocated in a user area. This is an appropriate offset for the next user variable when this word is used to start a sequence of +USER definitions intended to add to previously defined user variables.
'MAIN               ( -- addr )
Return the address of an execution vector containing the main program word to be launched at startup. This will occur after the DLLs have been loaded, but before the STARTER word set in a turnkey is executed. The default for SF.EXE is GUI-STARTUP (which launches the command window).
'MONITOR            ( -- addr )
Returns the address of an execution variable that may be set to contain an xt for a word to be executed by the INCLUDE monitor.
(.)                 ( n -- addr u )
Convert n to characters, without punctuation, as for . (dot), returning the address and length of the resulting string.
(DATE)              ( u1 -- addr u2 )
(DATE) is an execution vector that may be set to any suitable formatting behavior. The default is (SFDATE), which formats the MJD u1 as a string with the format mm/dd/yyyy, returning the address and length of the string.
(P)                 ( addr_1 addr_2 -- addr_3 )
Given the address addr_1 of a personality table and a personality execution vector addr_2, return the address of that vector in the specified table.
(SFDATE)            ( u1 -- addr u2 )
Format the MJD u1 as a string with the format mm/dd/yyyy, returning the address and length of the string. This is the default behavior of (DATE).
(TIME)              ( ud -- addr u )
Format the time ud as a string with the format hh:mm:ss, returning the address and length of the string.
(WID-CREATE)        ( addr u wid -- )
Create a definition for the counted string at addr, in the wordlist wid.
(WINLONGDATE)       ( u1 -- addr u2 )
Format the MJD u1 as a string using the Windows long date format. This is a possible alternative behavior for (DATE).
(WINSHORTDATE)      ( u1 -- addr u2 )
Format the MJD u1 as a string using the Windows short date format. This is a possible alternative behavior for (DATE).
++                  ( addr -- )
Increment the value at addr.
+PROGRESS           ( addr -- )
Launch a progress bar, with the ASCIIZ string whose address is given displayed in the title bar.
+SMUDGE             ( -- )
Set the smudge bit in the flags byte, thus rendering the name invisible to the dictionary search. This bit is set for a colon definition while it is being constructed, to avoid inadvertent recursive references.
+TO                 ( n "name" -- )
Add n to the contents of name, where name must be a local variable or defined by VALUE.
+USER               ( n1 n2 -- n3 )
Define a user variable at offset n1 in the user area, and increment the offset by the size n2 to give a new offset n3.
,"                  ( "string<quote>" -- )
Compile the following string in the dictionary starting at HERE, and allocate space for it.
,REL                ( addr -- )
Compile the absolute address addr at HERE, having first converted it to a relative address.
,U"                 ( "string<quote) " -- )
Compile a Unicode string. Analogous to U" but used interpretively, whereas U" belongs inside a definition.
,Z"                 ( "string<quote) " -- )
Compile a zero-terminated string with no leading count.
,Z\"                ( "string<quote) " -- )
Compile a zero-terminated string. The string may contain a \ followed by one or more characters which will be converted into a control or other special character according to the transformations listed in Table 15. (Differs from Z\" in that it is used interpretively to compile a string, whereas Z\" belongs inside a definition).
,\"                 ( "string<quote>" -- )
Similar to ," but the string may contain a \ followed by one or more characters which will be converted into a control or other special character according to the transformations listed in Table 15. For example, ,\" Nice\nCode!\n".
-?                  ( -- )
Suppress redefinition warning for the next definition only.
-PROGRESS           ( -- )
Close a current progress bar, if there is one. Does nothing otherwise.
-SMUDGE             ( -- )
Clear the smudge bit.
.DATE               ( u -- )
Display the MJD u in the format applied by (DATE).
.DLLS               ( -- )
Display a list of all available DLLs (previously defined with LIBRARY).
.IMPORTS            ( -- )
Display a list of all currently available WINPROCs (previously defined with IMPORT:), showing for each its resolved address, the DLL in which it is defined, and its name.
.PROGRESS           ( n -- )
Display gray bars in the horizontal progress area reflecting n percent (0..100) completion.
.SPART              ( addr n -- )
Display, in part n (0 through 5) of the status bar, the zero-terminated string located at addr.
.TIME               ( ud -- )
Display the time ud in the format applied by (TIME) above.
/FSTACK             ( -- )( F: i*r -- )
Clear the numeric stack.
1/N                 ( -- )( F: r_1 -- r_2 )
Replace the top floating-point stack value with its reciprocal value.
3DROP               ( x1 x2 x3 -- )
Drop the top three items from the stack.
3DUP                ( x1 x2 x3 -- x1 x2 x3 x1 x2 x3 )
Place a copy of the top three stack items onto the stack.
:PRUNE              ( addr1 -- addr2 )
Add an un-named definition to the list of functions to be executed when MARKER or REMEMBER is invoked, to restore the system to a saved state. When the :PRUNE definition is executed, addr1 provides the address where the data has been stored by a :REMEMBER in the same overlay layer.
<LINK               ( addr -- )
Add a link starting at HERE to the bottom of the linked list whose head is at addr. The new link is given a value of zero (indicating the bottom of the list), and the previous bottom link is set to point to this one.
>CODE               ( xt -- addr )
Return the code address addr corresponding to xt.
>f                  ( -- )
Assemble FPU instructions to transfer one numeric stack item to the hard-ware stack.
>fs                 ( n -- )
Assemble FPU instructions to transfer n numeric stack items to the hardware stack. Stack order is preserved.
>LINK               ( addr -- )
Add a link starting at HERE to the top of the linked list whose head is at addr (normally a variable). The head is set to point to the new link, which, in turn, is set to point to the previous top link.
>NAME               ( xt -- addr )
Return the address of the name field for the definition xt.
>PRINT              ( "commands<eol>" -- )
Execute whatever commands follow to the end of the line, routing any output to the current printer.
>THROW              ( n addr u -- n )
Associate the string addr u with the THROW code n such that SwiftForth's standard error handler will display that string if it CATCHes its error code. The code is returned to facilitate naming it as a constant.
?FSTACK             ( -- )( F: i*r -- i*r )
Check the numeric stack and abort if there are no numbers on it.
?PRUNE              ( -- flag )
Return true if the definition in which it is being invoked is being discarded (e.g., a MARKER is being executed).
?PRUNED             ( addr -- flag )
Return true if addr is no longer within the active dictionary (e.g., it has been discarded via MARKER or REMEMBER).
@+                  ( addr -- addr+4 x )
Fetch the value x from addr, and increment the address by one cell.
@DATE               ( -- u )
Return the current system date as an MJD.
@NOW                ( -- ud u )
Return the system time as an unsigned, double number ud representing seconds since midnight, and the system date as u days since 01/01/1900. Used (for example) by TIME&DATE (see the Forth Programmer's Handbook).
@REL                ( addr_1 -- addr_2 )
Fetch a relative address from addr_1 to the stack, converting it to the absolute address addr_2.
@TIME               ( -- ud )
Return the system time as an unsigned, double number representing seconds since midnight.
ACTIVATE            ( addr -- )
Instantiate the task whose TCB is at addr, and start it executing the words following ACTIVATE. Must be used inside a definition. The words after ACTIVATE must be structured as an infinite loop or must end with TERMINATE, so that the semicolon at the end of the definition is never executed. Also, the code must call PAUSE or STOP so task control can function properly. If the task was already instantiated, ACTIVATE will simply store into the task's user variable SAVEIP a pointer to the code following ACTIVATE. The task will begin executing the specified code immediately after the next PAUSE or STOP.
APPEND              ( addr1 u addr2 -- )
Append the string at addr1, whose length is u, to the counted string already existing at addr2. Does not check to see if space is allocated for the final string.
AS                  ( "name" -- )
Provide a different internal Forth name for an imported function, or a different external name for a function exported from a SwiftForth DLL (Section 8.2.2).
BINARY              ( -- )
Set BASE for binary (base 2) number conversions on input and output.
BODY>               ( addr -- xt )
Return the xt corresponding to the parameter field address addr.
CALLS               ( addr -- )
Run down a linked list starting at addr, executing the high-level code that follows each entry in the list.
CHECKITEM           ( n "text" -- )
Add an enabled menu item whose ID is n, which will be labeled text. Must be used within a menu or submenu definition. The item will be initially marked with a checkmark.
CIMPORT:            ( n "name" -- )
Define a named call to a C-prototype Windows procedure, which will take n parameters.
CODE>               ( addr -- xt )
Return the xt corresponding to the code address addr.
CONFIG:             ( "name" -- )
Define a word that will be placed in the list of configuration parameters to be maintained in the Windows registry. When executed, name must return the address and length of its data area, which will be recorded and initialized by SwiftForth at startup.
COS                 ( -- )( F: x -- r )
Return the cosine of x, where x is in degrees.
COT                 ( -- )( F: x -- r )
Return the cotangent of x, where x is in degrees.
COUNTER             ( -- u )
Return the current value of the millisecond timer.
CSC                 ( -- )( F: x -- r )
Return the cosecant of x, where x is in degrees.
C\"                 ( "string<quote>" -- addr )
Compile a counted string, returning its address. The string may contain a \ followed by one or more characters which will be converted into a control or other special character according to the transformations listed in Table 15.
C]                  ( -- )
Terminate a critical section.
D/M/Y               ( u1 u2 u3 -- u4 )
Convert day u1, month u2, and year u3 into MJD u4.
DASM                ( addr -- )
Disassemble code starting at addr.
DATE                ( -- )
Display the current system date.
DDE-END             ( -- )
Terminate the conversation.
DDE-INIT            ( -- )
Check for necessary data (server, topic, item) and open the conversation. If the server doesn't respond or doesn't recognize the topic, a 1005 THROW will occur.
DDE-REQ             ( -- addr )
Send a request item to the server, and receive a response as an ASCIIZ string at addr (which is at PAD).
DDE-SEND            ( addr n -- )
Send the string addr n to the server.
DefaultClass        ( addr xt -- n )
Register a class whose name is the zero-terminated string at addr and whose callback routine is xt, with default parameters as shown in Table 23. Return the class handle.
DefineClass   ( x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 -- n )
Accept parameters on the stack and register the class. Refer to Table 23 for the parameter list and descriptions. Return the class handle.
DF+!                ( addr -- )( F: r -- )
Same as F+!.
DFCONSTANT          ( "name" -- )( F: r -- )
Define a floating-point constant with the given name whose value is r, compiled in double (64-bit) format. When name is executed, r will be returned on the floating-point stack.
DFI@                ( addr -- )( F: -- r)
On this system, the same as FI@. "Double fetch"
DFLITERAL           ( -- )( F: r -- )
Compile the number on the floating-point stack as a 64-bit floating-point literal.
DFVARIABLE          ( "name" -- )
Define a floating-point variable with the given name, allocating space to store values in double (64-bit) format. When name is executed, the address of its data space will be returned on the data stack.
DPL                 ( -- addr )
Return the address of a variable containing the punctuation state of the number most recently converted by NUMBER? or NUMBER. If the value is negative, the number was unpunctuated. If it is non-negative, it represents the number of digits to the right of the rightmost punctuation character.
EAGER/LAZY          ( -- addr )
Variable that determines whether DLL files will be instantiated when loaded or when needed. A non-zero value causes instant instantiation; defaults to -1 (eager).
EDIT                ( "name" -- )
Launches or switches to a linked editor, passing it appropriate commands to open and position a source file. The name following EDIT is optional. If it is present, EDIT will attempt to find it as a defined word and to open the file in which it is defined, positioned at its definition. If name cannot be found in the dictionary, EDIT will attempt to treat it as a filename and open the file. If no text is provided, EDIT will select the source for the item most recently displayed by LOCATE, L, or a double-click.
EMPTY               ( -- )
Reset the dictionary to a predefined golden state, discarding all definitions and releasing all allocated data space beyond that state. The initial golden state of the dictionary is that following the launch of SwiftForth; this may be modified using GILD.
END-CODE            ( -- )
Terminate an assembler sequence started by CODE or LABEL.
ENG                 ( n -- )
Configure N. to use the FE. output format with n significant digits.
ENUM                ( n1 "name" -- n2 )
Define name as a constant with value n1, then increment n1 to return n2. Useful for defining a sequential list of constants (e.g., THROW codes; see Section 4.7).
ENUM4               ( n1 "name"-- n2 )
Define name as a constant with value n1, then increment n1 by four to return n2. Useful for defining a sequential list of constants that reference cells or cell offsets.
EXPIRED             ( u -- flag )
Return true if the current millisecond timer reading has passed u. For example, the following word will execute the hypothetical word TEST for u milliseconds:

Example

   : TRY ( u -- ) \ Run TEST repeatedly for u ms.
      COUNTER + BEGIN \ Add interval to curr. value.
         TEST \ Perform test.
      DUP EXPIRED UNTIL ; \ Stop when time expires.

EXPORT:             ( n "name" -- )
Export the function name so it will be available to other programs that load a DLL you create. n indicates the number of parameters needed by Forth-name.
F+!                 ( addr -- )( F: r -- )
Add the top floating-point stack value to the 64-bit contents of the address on the data stack. "Floating plus store"
F,                  ( -- )( F: r -- )
Compile the top 64-bit floating-point stack value into the dictionary. "Floating comma"
F.R                 ( n1 n2 -- )( F: r -- )
Display r with n2 significant digits, right-justified in a field n1 characters wide.
F2*                 ( -- )( F: r1 -- r2 )
Multiply the top floating-point stack value by 2.
F2/                 ( -- )( F: r1 -- r2 )
Divide the top floating-point stack value by 2.
F2DUP               ( -- ( F: r1 r2 -- r1 r2 r1 r2 )
Duplicate the top two floating-point stack items.
f>                  ( -- )
Assemble FPU instructions to transfer one hardware stack item to the numeric stack.
F>S                 ( -- n ) ( F: r -- )
Remove the top floating-point stack value, round it to a 32-bit integer, and push it on the data stack.
F?DUP               ( -- flag ) ( F: r -- r | )
Test the top of the floating-point stack for non-zero. If the number is non-zero, it is left and a true value is placed on the data stack; if the number is zero, it is popped and a zero (false) is placed on the data stack.
FI!                 ( addr -- ) ( F: r -- )
Store the top floating-point stack item, rounded to a 64-bit integer, in the address on the data stack. "Integer store"
FI@                 ( addr -- ) ( F: -- r)
Push on the floating-point stack the 64-bit data specified by the address on the data stack. "Integer fetch"
FILITERAL           ( -- ) ; ( F: r -- )
Compile the number on the floating-point stack as a 32-bit or 64-bit two's com-plement rounded integer. A double-length (64-bit) integer is compiled if the number exceeds 32 bits.
FIX                 ( n -- )
Configure N. to use the F. output format with n significant digits.
FL,                 ( -- ) ( F: r -- )
Same as F,.
FLITERAL            ( -- ) ; ( F: r -- )
Same as DFLITERAL.
FS,                 ( -- ) ( F: r -- )
The 32-bit equivalent of F,. "Floating short comma"
fs>                 ( n -- )
Assemble FPU instructions to transfer n hardware stack items to the numeric stack. Stack order is preserved.
FWITHIN             ( -- flag )( F: r l h )
Return a true value on the data stack if the floating-point value r lies between the floating-point values l and h, otherwise return false.
GET                 ( addr -- )
Obtain control of the facility variable at addr, having first executed PAUSE (to allow other tasks to run). If the facility is owned by another task, the task executing GET will wait until the facility is available.
GILD                ( -- )
Records the current state of the dictionary as a golden state such that subsequent uses of EMPTY will restore the dictionary to this state.
GRAYITEM            ( n "text" -- )
Add a disabled (gray) menu item whose ID is n, which will be labeled text. Must be used within a menu or sub-menu definition.
HALT                ( addr -- )
Cause the task whose TCB is at addr to cease operation permanently at the next STOP or PAUSE, but to remain instantiated.
HILO                ( n1 -- n2 n3 )
Return the upper and lower halves of n1 as n2 (high-order part) and n3 (low-order part).
HIS                 ( addr1 n -- addr2 )
Given a task address addr1 and user variable offset n, returns the address of the referenced user variable in that task's user area. Usage: <task-name> <user-variable-name> HIS
HIWORD              ( n1 -- n2 )
Return the high-order two bytes of n1 as n2 .
HOURS               ( ud -- )
Set the current system time to the value represented by ud, which was entered as hh:mm:ss.
HWND                ( -- n )
Return the handle of the window receiving the current message.
ICODE               ( "name" -- )
Start a new assembler definition, name. If the definition is referenced inside a colon definition, its code will be expanded in-line; if the definition is referenced interpretively, it will be executed. A word defined by ICODE may not contain any external references (calls or branches).
IDUMP               ( addr u -- )
Displays u bytes, starting at addr, as 32-bit integers in the current base.
IMPORT:             ( n "name"-- )
Define a named call to a Windows procedure, which will take n parameters.
INCLUDE             ( "filename[.ext]"-- )
Direct the text interpreter to process filename; the extension is required if it is not ".f". Path information is optional; it will search only in the current path, unless you precede filename with path information. Leaves BASE set to decimal. INCLUDE differs from the File > Include menu option and toolbar button in that it does not offer a browse dialog box and does not change your current path.
ITEM                ( "string<quote>" -- )
Set string as a data item to be used as the request or transaction.
KILL                ( addr -- )
Cause the task whose TCB is at addr to cease operation and release all its memory back to Windows. A task that has been KILLed may be re-activated.
KNOWN-VKEYS         ( -- addr )
Return the address of a table of VKEYS. If an incoming <xxx>KEYDOWN event matches an entry in this table, it will not generate a WM_CHAR message, and SwiftForth will return the value from the table, masked as appropriate with the bits shown in Figure 22.
L                   ( -- )
Following a compiler error, display the line of source at which the error occurred, along with the source path and line number, in the SwiftForth command window.
LABEL               ( "name" -- )
Start an assembler code fragment, name. If the definition is referenced, either inside a definition or interpretively, the address of its code will be returned on the stack.
LIBRARY             ( "filename.dll" -- )
Add filename to the list of DLLs currently available to SwiftForth.
LMATRIX             ( nr nc "name" -- )
Construct a similar matrix with 64-bit storage locations.
LMD                 ( nr nc "name" -- )
Similar to SMD but displays a long (64-bit entries) matrix.
LOCALS|  ( xn ... x2 x1 "name_ name2 ... namen |" -- )
Create up to 16 local variables, giving each an initial value taken from the stack such that name1 has the value x1, etc. Must be used inside a colon definition.
LOCATE              ( "name" -- )
Display the source from which name was compiled, with the source path and definition line number, in the SwiftForth command window. name must be in the current scope.
Equivalent to double-clicking on name.
LOHI                ( n1 -- n2 n3 )
Return the upper and lower halves of n1 as n2 (low-order part) and n3 (high-order part).
LOWORD              ( n1 -- n2 )
Return the low-order two bytes of n1 as n2 .
LPARAM              ( -- n )
Return the fourth parameter for the current message. Its content is message-dependent.
M/D/Y               ( ud -- u )
Accept an unsigned, double-number date which was entered as mm/dd/yyyy, and convert it to MJD.
MAKE-FLOOR          ( -- )
Configure SwiftForth to use truncation when transferring numbers from the floating-point stack to the data stack. This is the ANS Forth convention, and is the default in SwiftForth.
MAKE-ROUND          ( -- )
Configure SwiftForth to use rounding when transferring numbers from the floating-point stack to the data stack. This is the FPU convention.
MEM                 ( addr -- )
Start a window providing a dynamic view of a region of memory starting at addr. If a memory window is already open, sets its initial address to addr.
MENUITEM            ( n "text" -- )
Add an enabled menu item whose ID is n, which will be labeled text on the menu. Must be used within a menu or sub-menu definition.
MONITOR             ( -- addr )
Returns the address of the variable whose least-significant byte controls the actions of the INCLUDE monitor. Bit assignments are shown in Table 11.
MS                  ( n -- )
PAUSE the current task for n milliseconds. The accuracy of this interval is always about one clock tick.
MSG                 ( -- n )
Return the message number of the current message.
N.                  ( -- )( F: r -- )
Display r in a format selected by FIX, SCI, or ENG.
NAME>               ( addr -- xt )
Return the xt corresponding to the name at addr.
NEXT-WORD           ( -- addr u )
Get the next word in the input stream--extending the search across line breaks as necessary, until the end-of-file is reached--and return its address and length. Returns a string length of 0 at the end of the file.
NH                  ( -- addr )
Return the address of a variable containing the high-order part of the number most recently converted by NUMBER? or NUMBER.
NOW                 ( ud -- )
Set the current system date to the value represented by the unsigned, double number which was entered as mm/dd/yyyy.
NUMBER              ( addr u -- n | d )
Attempt to convert the characters in the string at addr, whose length is u, into digits, using the radix in BASE, until the length u expires or a space is encountered.
If valid punctuation ( , . + - / : ) is found, returns d; if there is no punctuation, returns n; if conversion fails due to a character that is neither a digit nor punctuation, an ABORT will occur.
NUMBER?             ( addr u -- 0 | n1 | d 2 )
Attempt to convert the characters in the string at addr, whose length is u, into digits, using the radix in BASE, until the length u expires or a space is encoun-tered.
If valid punctuation ( , . + - / : ) is found, returns d and 2; if there is no punctuation, returns n and 1; if conversion fails due to a character that is neither a digit nor punctuation, returns 0 (false).
OCTAL               ( -- )
Set BASE for octal (base 8) number conversions on input and output.
OFF                 ( addr -- )
Set the flag at addr to false.
ON                  ( addr -- )
Set the flag at addr to true.
PAUSE               ( -- )
Relinquish the CPU briefly (typically about a millisecond), while checking for messages if the task has a message queue.
PERSONALITY         ( "name" -- )
Define a serial device personality, allocating an appropriate amount of space for it and initializing all its vectors to "do-nothing" behaviors with suitable stack effects. Execution of name returns the address of the beginning of its table.
PLACE               ( addr1 u addr2 -- )
Put the string at addr1, whose length is u, at addr2, formatting it as a counted string (count in the first byte). Does not check to see if space is allocated for the final string, whose length is n+1.
POPPATH             ( -- )
Pop the top path from the directory stack to become the new current path.
PROGRAM             ( "filename[.ext]" -- )
Record a "snapshot" of the current running system in the current path (or in the path specified with filename). If the optional file extension is omitted, .exe will be assumed and a bootable .EXE file will be built. If you choose to specify it, you may use either .exe or .dll.
PROGRESS-NAME       ( addr -- )
Display the ASCIIZ string, whose address is given, in the title bar (replacing any previous title).
PROGRESS-TEXT       ( addr -- )
Display the ASCIIZ string, whose address is given, in the text field below the progress area.
PUSHPATH            ( -- )
Push the current directory path onto the directory stack.
RELEASE             ( addr -- )
Relinquish the facility variable at addr. If the task executing RELEASE did not previously own the facility, this operation is a no-op.
REMEMBER            ( "name" -- )
Create a dictionary entry for name, to be used as a deletion boundary. When name is executed, it will remove all subsequent definitions from the dictionary and execute all :PRUNE definitions (beginning with the earliest) to restore the system to the state it was in when name was defined. Note that name remains in the dictionary, so it can be used repeatedly.
RESUME              ( addr -- )
Cause the task whose TCB is at addr to resume operation at the point at which it was SUSPENDed.
RUNS  ( switch-sys addr n "word" -- switch-sys addr )
Add an entry to a switch structure whose key value is n and whose associated behavior is the previously defined word. The parameters switch-sys and addr are used internally during construction of the switch.
S>F                 ( n -- )( F: -- r )
Remove a 32-bit value from the data stack and push it on the floating-point stack.
SBLEFT              ( n -- addr )
Return the address of the cell containing the xt of the behavior for a left mouse click in status bar part n.
SBRIGHT             ( n -- addr )
Return the address of the cell containing the xt of the behavior for a right mouse click in status bar part n.
SCI                 ( n -- )
Configure N. to use the FS. output format with n significant digits.
SEC                 ( -- )( F: x -- r )
Return the secant of x, where x is in degrees.
SEE                 ( "name" -- )
Disassemble name.
SEPARATOR           ( -- )
Add a separator bar at the current position in a menu. Must be used within a menu or sub-menu definition.
SERVER              ( "name" -- )
Set the string name as the server identifier.
SF+!                ( addr -- )( F: r -- )
The 32-bit equivalent of F+!. "Short floating plus store"
SFCONSTANT          ( "name" -- )( F: r -- )
Define a floating-point constant with the given name whose value is r, compiled in short (32-bit) format. When name is executed, r will be returned on the floating-point stack.
SFI@                ( addr -- )( F: -- r)
Push on the floating-point stack the 32-bit data specified by the address on the data stack. "Single fetch"
SFLITERAL           ( -- )( F: r -- )
Compile the number on the floating-point stack as a 32-bit floating-point literal.
SFVARIABLE          ( "name"-- )
Define a floating-point variable with the given name, allocating space to store values in short (32-bit) format. When name is executed, the address of its data space will be returned on the data stack.
SILENT              ( -- )
Disables the INCLUDE monitor.
SIN                 ( -- )( F: x -- r )
Return the sine of x, where x is in degrees.
Sleep               ( n -- )
Relinquish the CPU for approximately n milliseconds. If n is zero, the task relinquishes the rest of its time slice (typically about 10 milliseconds). Sleep is a Windows call used by MS and PAUSE, and is appropriate when the task wishes to avoid checking its message queue.
SMATRIX             ( nr nc "name" -- )
Construct a matrix containing space for nr rows and nc columns, with 32 bits per entry.
SMD                 ( nr nc "name" -- )
Display a previously defined short (32-bit entries) matrix. The number of rows and columns must agree with the number in the definition.
STARTER             ( "wordname" -- )
When used before PROGRAM, specifies that when the turnkey is launched it will automatically execute wordname following its default initialization. This may be used to provide application-specific initialization.
STOP                ( -- )
Check for messages (if the task has a message queue) and suspend operation indefinitely (until restarted by another task).
STRING,             ( addr u -- )
Compile the string at addr, whose length is u, in the dictionary starting at HERE, and allocate space for it.
SUSPEND             ( addr -- )
Force the task whose TCB is at addr to suspend operation indefinitely.
SWITCH]             ( switch-sys addr -- )
Terminate a switch structure (or the latest additions to it) by marking the end of its linked list. switch-sys and addr are used while building the structure; they are discarded by SWITCH].
S\"                 ( "string<quote>" -- addr n )
Compile a string, returning its address and length. The string may contain a \ followed by one or more characters which will be converted into a control or other special character according to the transformations listed in Table 15.
TAN                 ( -- )( F: x -- r )
Return the tangent of x, where x is in degrees.
TASK                ( n "taskname" -- )
Define a task, whose combined user area and data stack will be n bytes (4,096 minimum) in size. Invoking taskname returns the address of the task's Task Control Block (TCB).
TERMINATE           ( -- )
Causes the task executing this word to cease operation and release all its memory back to Windows. A task that terminates itself may be re-activated.
TIME                ( -- )
Display the current system time.
TIMER               ( u -- )
Repeat COUNTER, then subtract the two values and display the interval between the two in milliseconds.
TOPIC               ( "string<quote>" -- )
Set string as the topic.
U"                  ( "string<quote>" -- addr )
Compile a Unicode string, returning its address. The string consists of 16-bit characters, with an ASCII code in the low-order byte and zero in the high-order byte.
UBETWEEN            ( u1 u2 u3 -- flag )
Test for u2 <= u1 <= u3. Similar to WITHIN but tests only unsigned integers and is inclusive of both u2 and u3.
uCOUNTER            ( -- d )
Return the current value of the microsecond timer.
UNCALLED            ( -- )
List all words that have never been called in a colon definition.
uTIMER              ( d -- )
Repeat uCOUNTER, then subtract the two values and display the interval between the two in microseconds.
U\"                 ( "string<quote>" -- addr )
Compile a Unicode string, returning its address. The string may contain a \ followed by one or more characters which will be converted into a control or other special character according to the transformations listed in Table 15.
VERBOSE             ( -- )
Enables the INCLUDE monitor, with a default behavior of 4 (display the text of each line).
WARNING             ( -- addr )
Return the address of the flag that controls compiler redefinition warnings. If it is true, warnings will be issued.
WATCH               ( addr -- )
Add addr to the list of cells being monitored as watch points, and launch the watch window if it is not already active. The contents of addr will be displayed in the number base that is current when WATCH is invoked.
WH                  ( "name" -- )
Synonym of WHERE.
WHERE               ( "name" -- )
Display a cross-reference showing the definition of name and each line of source in which name is used in the currently compiled program. WH and WHERE are synonyms.
WINERROR            ( -- addr u )
Following a Windows exception caught by CATCH, return the address and length of the string, provided by Windows, that identifies the exception.
WPARAM              ( -- n )
Return the third parameter for the current message. Its content is message-dependent.
Z"                  ( "string<quote>" -- addr )
Compile a zero-terminated string, returning its address.
ZAPPEND             ( addr1 u addr2 -- )
Append the string at addr1, of length u, to the zero-terminated string already existing at addr2. Does not check to see if space is allocated for the final string.
ZERO                ( x -- 0 )
Replace the top stack item with the value 0 (zero).
ZPLACE              ( addr1 u addr2 -- )
Put the string at addr1 , whose length is u, at addr2 as a zero-terminated string. Does not check to see if space is allocated for the final string.
Z\"                 ( "string<quote>" -- addr )
Compile a zero-terminated string, returning its address. The string may contain a \ followed by one or more characters which will be converted into a control or other special character according to the transformations listed in Table 15.
[+ASSEMBLER]        ( -- )
Add the assembler vocabulary to the top of the current search order. An immediate word (will be executed immediately when used inside a colon definition).
[+FORTH]            ( -- )
Add the main Forth vocabulary to the top of the current search order. An immediate word (will be executed immediately when used inside a colon definition).
[+SWITCH            ( "name" -- switch-sys addr )
Open the switch structure name to include additional list entries. The default behavior remains unchanged. The additions, like the original entries, are terminated by SWITCH]. switch-sys and addr are used while building the structure; they are discarded by SWITCH].
[C                  ( -- )
Begin a critical section. Other SwiftForth tasks cannot execute during a critical section.
[MENU               ( "name" -- )
Start building the data structure for a menu. Terminated by MENU]. Between [MENU and MENU] may be sub-menus described with [POPUP ... POPUP] and individual menu items. Use of name will return the data structure's address.
[POPUP              ( "label" -- )
Start building a popup sub-menu whose definition will be terminated by POPUP]. Between [POPUP and POPUP] may be individual menu items. The sub-menu will appear as label on the parent menu. Sub-menus may be nested.
[PREVIOUS]          ( -- )
Remove the top of the current search order. Often used to "undo" [+FORTH] or [+ASSEMBLER]. An immediate word (will be executed immediately when used inside a colon definition).
[SWITCH             ( "name" -- switch-sys addr )
Start the definition of a switch structure consisting of a linked list of single-precision numbers and associated behaviors. The switch definition will be terminated by SWITCH], and can be extended by [+SWITCH. See the discussion above for syntax.
switch-sys and addr are used while building the structure; they are discarded by SWITCH].
The behavior of name when invoked is to take the number on the stack, and search the list for a matching value. If a match is found, the corresponding behavior will be executed; if not, the switch's default behavior will be executed with the value on the stack.
_PARAM_4, _PARAM_5, _PARAM_6, _PARAM_7  ( -- n )
Return the fifth through the eighth parameters for the current message, respectively. The content of each is message-dependent.
{                   ( -- )
Begin a comment that may extend over multiple lines, until a terminating right brace } is encountered.
~!+                 ( x addr -- addr+4 )
Write the value x to addr, and increment the address by one cell (accepts the parameters in reverse order compared to !+).

Go back to home page.