G


get_env
( 'env-string --- )
"get-e-n-v". Retrieves the system environment variable whose name is contained in 'env-string. The original value is replaced with the value returned by the system.
    80 string value
    value " UNTIL-DIR" strcpy
    value get_env
    value dup count type cr

gotoxy
( col row --- )
"go to x-y". Position the screen cursor to column col and row row. This word uses a Borland C++ specific function and may need modification with other compilers.
gsub
( 'string 'search 'replace --- #matches )
"g-sub". The global search and replace word searches string for search and replaces it with replace when a match occurs. This version performs multiple replacements in the string. The number of replacements is returned.
   inbuf 1+ " is" " is not" gsub
Searches <INBUF> for occurrences of "is" and replaces each with "is not".

H


help
( --- )
"help". Looks up the specified word name in HELP.APP and prints the entry to the screen. Usage:
      help do
prints the help entry for "do". Use the words command to type the words defined.
here
( --- 'here )
"here". Push the address contained in the system variable, here onto the parameter stack. In Until, here is allocated at startup. Most other Forths allow it to float at the end of the dictionary. here is initially 128 bytes. here and pad are the same size.
hex
( --- )
"hex". Set the current base to 16.
hold
( char --- )
"hold". Add char to the numeric string. hold is used with <# ... #> to format numbers.

I


i
( --- i )
"i". Push the current do loop index onto the Data Stack. When loops are nested, i always refers to the current loop.
   : test_i
     10 0 do i loop ;

if
( tf --- )
"if". Test the value on the top of the stack for True or False.
      5 5 =
      if   " True comparison"
      else " False comparison"
      endif
The function do_if is executed at run-time.
immediate
( --- )
"immediate". Flag the last word in the dictionary as immediate. An immediate word executes at compile time rather than being compiled into the dictionary. Words such as if and do are immediate. Until primitives built with build_iprim() are immediate.
include
( --- )
"include". Compiles the file specified as the next token in the input stream.
      include source.fth
Compiles the file, source.fth, then returns to normal interpretation of the console. include is nestable.
insert
( 'string 'new-string --- 'string )
"insert". Insert new-string at the beginning of string. The address of the original string is returned.

Table of Contents
Next Section