home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / max / max130 / detail2.doc < prev    next >
Text File  |  1988-10-30  |  33KB  |  1,002 lines

  1.  
  2. lstcput (ld_int value_exp)
  3.  
  4.     Lstcput sets the value of the current list node to value_exp.
  5.     It does not create a new node. The current location is not changed
  6.     by this function.
  7.  
  8.     See also: lsthead, lsttail, lstprev, lstnext, lstsub
  9.  
  10. lstcre ([init_exp...])
  11.  
  12.     Lstcre creates a list and returns a list descriptor. The list
  13.     may be initialized by specifying an optional list of init_exp...
  14.  
  15.     Lists are collections of nodes. Each node can contain one value
  16.     and can be connected to other nodes. Possible connections are:
  17.  
  18.         to a previous node
  19.         to a subsequent (or next) node
  20.         to an alternate (or sub) node
  21.  
  22.     New nodes are added to a list by push operations. These are
  23.     identified by a "psh" suffix. Existing nodes are removed
  24.     from a list by pop operations. These are identified by a "pop"
  25.     suffix. The value of a node may be retrieved using list functions
  26.     with a "get" suffix and updated using list functions with a
  27.     "put" suffix.
  28.  
  29.     A current location, initially undefined, may be associated with
  30.     each list. The current location may be set to the head or tail
  31.     and moved to a previous, next or sub node. The current location
  32.     may then be used to add or remove nodes and get or put the value
  33.     of nodes.
  34.  
  35.     Each list is identified by its list descriptor and all list
  36.     builtin functions require that the list descriptor be specified
  37.     as the first argument.
  38.  
  39.     See also: lstfre
  40.  
  41. lstcval (ld_int)
  42.  
  43.     Lstcval returns TRUE if the current location is set for the
  44.     specified list descriptor and FALSE otherwise.
  45.  
  46.     See also: lsthead, lsttail, lstprev, lstnext, lstsub
  47.  
  48. lstfre (ld_int)
  49.  
  50.     Lstfre frees the list specified by the list descriptor. Once a
  51.     list is freed its storage is reused and it can no longer by 
  52.     referenced.
  53.  
  54.     See also: lstcre
  55.  
  56. lsthead (ld_int)
  57.  
  58.     Lsthead moves the current location to the head of the list
  59.     specified by ld_int. If the list is empty the current location
  60.     remains undefined.
  61.  
  62.     See also: lstcget, lstcput, lstcpsh, lstcpop
  63.  
  64. lsthget (ld_int)
  65.  
  66.     Lsthget returns the value of the head node of the list. The
  67.     node is not removed.
  68.  
  69. lsthpsh (ld_int value_exp)
  70. lstpsh
  71.  
  72.     Lsthpsh creates a new node at the head of the list specified by
  73.     ld_int and initializes it to value_exp. Used with lsttpop, which
  74.     removes a node from the tail of the list, it forms a simple
  75.     FIFO queue.
  76.  
  77.  
  78. lsthput (ld_int value_exp)
  79.  
  80.     Lsthput sets the value of the head node of the list specified
  81.     by ld_int to value_exp. It does not create a new node.
  82.  
  83. lstnext (ld_int)
  84.  
  85.     Lstnext moves the current location to the next node in the list
  86.     specified by ld_int. If no current location has been set or the list
  87.     is empty then the current location remains undefined.
  88.  
  89.     See also: lstcget, lstcput, lstcpsh, lstcpop
  90.  
  91. lstnval (ld_int)
  92.  
  93.     Lstnval returns TRUE if there is a node following the current
  94.     location and FALSE otherwise.
  95.  
  96. lstprev (ld_int)
  97.  
  98.     Lstprev moves the current location to the previous node in the list
  99.     specified by ld_int. If no current location has been set or the list
  100.     is empty then current location remains undefined.
  101.  
  102.     See also: lstcget, lstcput, lstcpsh, lstcpop
  103.  
  104. lstpval (ld_int)
  105.  
  106.     Lstpval returns TRUE if there is a node preceding the current
  107.     location and FALSE otherwise.
  108.  
  109. lstread (fd_int)
  110.  
  111.     Lstread reads a list from the file specified by the file 
  112.     descriptor fd_int and returns a list descriptor for the new
  113.     list. The file must be in the format created by lstwrite. Each
  114.     list or sublist must be surrounded by parentheses and each
  115.     element must be surrounded by quotes. Embedded quotes must
  116.     be escaped using the \" notation. White space and text
  117.     outside quotes is ignored.
  118.  
  119. lstsget (ld_int)
  120.  
  121.     Lstsget returns the value of the sub node of the current
  122.     node of the list specified by ld_int. The node is not removed.
  123.     The current location must have been defined previously.
  124.  
  125. lstsize (ld_int)
  126.  
  127.     Lstsize returns the total number of nodes, including sub lists,
  128.     in the list specified by ld_int.
  129.  
  130. lstsort (ld_int [compare_udf])
  131.  
  132.     Lstsort sorts the list specified by ld_int. A user defined
  133.     compare function may be specified that will be invoked for each
  134.     comparison required by the sort. The function will be passed two
  135.     values and should return -1, 0 or 1 as the first value is less
  136.     than, equal to or greater than the second value. Lstsort sorts
  137.     sub lists if any exist.
  138.  
  139. lstspop (ld_int)
  140.  
  141.     Lstspop removes the sub node of the current node from the
  142.     list specifed by ld_int and returns its value. Once a node is
  143.     removed it is no longer accessible. If the sub node is the
  144.     head of a sublist then the entire sublist is freed.
  145.  
  146. lstspsh (ld_int value_exp)
  147.  
  148.     Lstspsh creates a sub list from the current location. A sub list
  149.     has all the attributes of a list except that it is referenced from
  150.     a node rather than a list descriptor. This may be used to implement
  151.     trees. A sub list node is created at the current location and
  152.     initialized to value_exp. If there was previously a sub list then
  153.     the new node is inserted between the current node and the sub
  154.     list. The new node becomes the new current location.
  155.  
  156. lstsput (ld_int value_exp)
  157.  
  158.     Lstsput sets the value of the sub node of the current node
  159.     of the list specified by ld_int to value_exp. It does not create
  160.     a new node. The current location must have been defined previously.
  161.  
  162. lstsub (ld_int)
  163.  
  164.     Lstsub moves the current location to the sub node in the list
  165.     specified by ld_int. If no current location has been set or the list
  166.     is empty then the current location remains undefined.
  167.  
  168.     See also: lstcget, lstcput, lstcpsh, lstcpop
  169.  
  170. lstsval (ld_int)
  171.  
  172.     Lstsval returns TRUE if there is a sub node at the current
  173.     location and FALSE otherwise.
  174.  
  175. lsttail (ld_int)
  176.  
  177.     Lsttail sets the current location of the list specified by 
  178.     ld_int to the tail of the list.
  179.  
  180.     See also: lstcget, lstcput, lstcpsh, lstcpop
  181.  
  182. lsttget (ld_int)
  183.  
  184.     Lsttget returns the value of the tail node of the list. The
  185.     node is not removed.
  186.  
  187. lsttpop (ld_int)
  188. lstpop
  189.  
  190.     Lstpop removes a node from the tail of the list specified by
  191.     ld_int and returns its value. Once a node is removed from a list
  192.     it is no longer accessible. Used with lsthpsh, which pushes a
  193.     node on the head of the list, it forms a simple FIFO queue.
  194.     If the node that was removed was the current location then
  195.     the current location becomes undefined.
  196.  
  197. lsttpsh (ld_int value_exp)
  198.  
  199.     Lsttpsh creates and inserts a new list node at the tail of
  200.     the list specified by ld_init. The new node becomes the new
  201.     tail of the list.
  202.  
  203. lsttput (ld_int value_exp)
  204.  
  205.     Lsttput sets the value of the tail node of the list specified
  206.     by ld_int to value_exp. It does not create a new node.
  207.  
  208. lstwrite (ld_int fd_int)
  209.  
  210.     Lstwrite writes the list specified by the list descriptor
  211.     ld_int to the file specified by the file descriptor fd_int.
  212.     Each list or sublist is surrounded by parenthesis and each
  213.     list element is surrounded by quotes. The list is indented
  214.     using tabs for readability.
  215.         
  216. lt (value_num...)
  217. <
  218.  
  219.     Lt performs a less than comparison of its
  220.     arguments from left to right and returns true if each argument
  221.     passes the comparison, otherwise false. If only one argument is
  222.     specified it compares it to zero and returns the result.
  223.  
  224. memcre (len_int)
  225.  
  226.     Memcre allocates a len_int bytes (characters) of memory directly
  227.     from the system and returns the address.
  228.  
  229.     Note: the address is returned in hexadecimal.
  230.  
  231. memfre (address_hex)
  232.  
  233.     Memfre frees a block of memory previously allocated by memcre. This
  234.     function should be used with extreme care because no check is
  235.     performed to validate the address prior to freeing it.
  236.  
  237.     Note: the address must be specified in hexadecimal.
  238.  
  239. memget (address_hex len_int)
  240.  
  241.     Memget returns len_int bytes of data read directly from the
  242.     memory address specified by address_hex.
  243.  
  244.     Note: the address must be specified in hexadecimal.
  245.  
  246. memput (address_hex value_exp len_int)
  247.  
  248.     Memput stores len_int bytes of value_exp directly into the
  249.     memory addressed by address_hex.
  250.  
  251.     Note: the address must be specified in hexadecimal.
  252.  
  253. mkdir (path_str)
  254.  
  255.     Mkdir creates a new directory specified by path_str. Each
  256.     component of the pathname (if any) must exist except the last one.
  257.  
  258. mod (dividend_exp divisor_exp)
  259. %
  260.  
  261.     Mod returns the remainder of dividend_exp divided by divisor_exp.
  262.  
  263. mul (value_exp value_exp...)
  264. *
  265.  
  266.     Mul returns the product of its arguments.
  267.  
  268. ne (value_num value_num...)
  269. <
  270.  
  271.     Ne returns TRUE if none of its arguments are equal to the
  272.     leftmost argument. Otherwise it returns FALSE.
  273.  
  274. not (value_int)
  275. !
  276.  
  277.     Not returns the logical negation of its arguments. A zero is
  278.     returned for any non zero argument and a one is returned for a
  279.     an argument that evaluates to zero.
  280.  
  281. open (path_str mode_str)
  282.  
  283.     Open opens the file specified by path_str with a mode specified
  284.     by mode_str. Possible values of mode_str are:
  285.  
  286.         a - append to end of file
  287.         b - binary, do not map crlf to lf
  288.         c - create file if it does not exist
  289.         r - open file for reading
  290.         t - truncate file
  291.         u - update, open for reading and writing
  292.         w - open file for writing
  293.  
  294.     Modes can be combined by specifying both letters. To open
  295.     an existing file for writing and truncate it at the beginning
  296.     you would specify "tw".
  297.  
  298.     Note: the "\" character is the Max escape character. If you wish
  299.     to use it in a literal pathname be sure to specify it as "\\".
  300.  
  301.     Open returns a file descriptor that is used in subsequent calls
  302.     to read and write. Operating system specific devices can be opened
  303.     with the open function. The standard input, standard output and
  304.     standard error devices are available as file descriptors 0, 1
  305.     and 2 and do not need to be opened.
  306.  
  307.     The return code is negative if an error occurred:
  308.  
  309.         -2    Cannot access file
  310.         -3    Too many open files
  311.         -4    File not found (specify "c" to create)
  312.  
  313.     See also: close, write, seek, tell
  314.  
  315. or (value_exp value_exp)
  316. |
  317.  
  318.     Or performs a logical OR of its arguments. It returns TRUE if
  319.     any of its arguments are non-zero and it returns FALSE if all of
  320.     its arguments are zero.
  321.  
  322. out (port_int value_int)
  323.  
  324.     Out sends value_int to the hardware port specified by port_int.
  325.  
  326. patalt (pat_bif pat_bif...)
  327.  
  328.     Patalt specifies a list of possible primitives to match the 
  329.     input text. Each primitive is invoked from left to right until a
  330.     match occurs. If no primitive matches the input text then patalt
  331.     fails. 
  332.  
  333.     Example: To match either either "abc" or "xyz" use:
  334.  
  335.         ... patalt ("abc" "xyz") ...
  336.  
  337. patarb ([min_int [max_int]])
  338.  
  339.     Patarb matches an arbitrary number of characters. To be useful it
  340.     should be followed by something specific to search for, such as a
  341.     literal, group or range. Used in this matter it will match everything
  342.     up to the specified pattern (provided the specified pattern can be
  343.     found).
  344.  
  345. patcre (pat_bif...)
  346.  
  347.     Patcre creates a pattern and returns a pattern descriptor. The
  348.     pattern descriptor may be used in subsequent calls to patmatch to
  349.     match text. When the pattern is no longer needed it should be
  350.     freed with patfre.
  351.  
  352.     A pattern is composed of a series of pattern primitives specified
  353.     by the argument list to patcre. Each primitive supports a particular
  354.     type of pattern matching. There are primitives to match an arbitrary
  355.     number of characters (patarb) up to some literal text (patlit),
  356.     primitives to match any character from a set of characters (patgrp)
  357.     or within a range of characters (patrng). There are also primitives
  358.     that allow a choice of possible matches (patalt) or use a previously
  359.     defined pattern (patuse).
  360.  
  361.     The patcre, patmatch and patfre builtin functions are standalone
  362.     functions that may be used like any other builtin function. They
  363.     reference the pattern via a pattern descriptor. All the other 
  364.     pattern functions are primitives and may only be used to define
  365.     a pattern, i.e. inside the argument list of patcre.
  366.     
  367.     For primitives that accept a minimum and maximum number of times
  368.     to apply the match the default is once. If minimum is specified
  369.     as -1 the current length of the input text is used.
  370.  
  371.     Example: A simple pattern to isolate the text that precedes a comma
  372.     could be specified as follows:
  373.  
  374.         set (pd patcre (patset (text_var patarb ()) ","))
  375.  
  376.     The call to patcre would return a pattern descriptor, pd, that would
  377.     then be used in a call to patmatch:
  378.  
  379.         patmatch ("abcdef,ghijkl" pd)
  380.  
  381.     The call to patmatch would return TRUE to indicate that match
  382.     succeeded and text_var would be set to the string "abcdef". The
  383.     patmatch could be done any number of times on different input
  384.     strings. When the pattern is no longer needed it is freed:
  385.  
  386.         patfre (pd)
  387.  
  388.     See also: patmatch, patfre
  389.  
  390. pateol ()
  391.  
  392.     Pateol matches the end of line (ascii linefeed).
  393.  
  394. patfre (pd_int)
  395.  
  396.     Patfre frees a pattern. Once a pattern is freed its storage
  397.     is reused and the pattern is no longer accessable.
  398.  
  399. patgrp (group_str [min_int [max_int]])
  400.  
  401.     Patgrp matches any character that appears in group_str.
  402.  
  403. patlit (literal_str [min_int [max_int]])
  404. ""
  405.  
  406.     Patlit matches the sequence of (one or more) characters specified
  407.     by literal_str, optionally a minimum or minimum and maximum number
  408.     of times as specified by min_int and max_int. Because this function
  409.     is used so frequently a shorthand form of it may be specified just
  410.     by specifying the literal string in quotes. 
  411.  
  412. patmatch (input_str pd_int)
  413.  
  414.     Patmatch attempts to match the input text specified by input_str
  415.     using the pattern specified by pd_int. Each primitive in the pattern
  416.     is applied to the input text until one fails to match or until all
  417.     the primitives in the pattern have been matched. If each of the
  418.     primitives matches then patmatch returns TRUE, otherwise it returns
  419.     FALSE.
  420.  
  421. patneg (pat_bif...)
  422.  
  423.     Patneg negates the status of the pattern specified by its
  424.     arguments. If the arguments matched the input text then patneg
  425.     fails, otherwise it succeeds.
  426.  
  427. patpat (pat_buf...)
  428.  
  429.     Patpat groups a block of pattern primitives together, possibly
  430.     for use in a patalt call.
  431.  
  432. patrem ()
  433.  
  434.     Patrem matches the remainder of the input string.
  435.  
  436. patrng (range_str [minimum_int [maximum_int]])
  437.  
  438.     Patrng matches characters in the range specified by range_str
  439.     using the ascii collating sequence. The range_str is a two 
  440.     character string. The first character specifies the low end of
  441.     the range and the second character specifies the high end of the
  442.     range. A string of "gm" would match any character between "g" 
  443.     and "m" inclusive.
  444.  
  445. patset (match_var pat_bif...)
  446.  
  447.     Patset sets the variable specified by match_var to the text
  448.     matched by the list of builtin functions, pat_bif... The assignment
  449.     is performed during a successful match by patmatch.
  450.  
  451. patuse (pd_int)
  452.  
  453.     Patuse attempts to match the pattern specified by pd_int against
  454.     the remainder of the input string. It is similar to invoking 
  455.     patmatch within a pattern.
  456.  
  457. pow (x_num y_num)
  458.  
  459.     Pow returns x_num raised to the power y_num.
  460.  
  461. put ([value_exp...])
  462. print
  463.  
  464.     Put displays the values specified by value_exp... Each value
  465.     is output without additional spaces and the list is terminated
  466.     with a carriage return and linefeed.
  467.     
  468.     See also: format, get (input)
  469.  
  470. putx ([value_exp...])
  471. printx
  472.  
  473.     Putx displays the values specified by value_exp... Each value
  474.     is output without additional spaces and the cursor is left one
  475.     space to the right of the last character displayed.
  476.  
  477.     Note: when prompting for information in the integrated
  478.     environment a prompt character must be used to distinguish
  479.     the prompt from the response. See the Prompt form of the
  480.     window function.
  481.  
  482. quit (exitcode_int)
  483.  
  484.     Quit terminates the Max interpreter and returns exitcode_int
  485.     to the operating system.
  486.  
  487.     See also: do, exit, for, goto, if, label, leave, loop,
  488.           return, select, quit, until, while
  489.  
  490. rand (seed_int)
  491.  
  492.     Rand returns a pseudo-random number. Seed_int may be used to seed
  493.     the pseudo-random number generator.
  494.  
  495. read (fd_int buf_var [len_int])
  496.  
  497.     Read reads the file specified by fd_int into the buffer specifed
  498.     by buf_var. An optional length parameter, len_int, may be used to
  499.     specify the number of bytes (characters) to read. If the length
  500.     parameter is not specified then one line is read from the file.
  501.     This function return the number of bytes read, which may be less
  502.     than that requested at the end of the file.
  503.  
  504.     See also: open, close, write, seek, tell
  505.  
  506. rename (oldpath_str newpath_str)
  507.  
  508.     Rename renames the file specified by oldpath_str to the new name
  509.     specified by newpath_str.
  510.  
  511. return ([retval_exp])
  512.  
  513.     Return is a flow of control construct. It returns from the 
  514.     currently executing builtin function. A value may be returned
  515.     to the caller using retval_exp. 
  516.  
  517.     Example: if a user defined function called greet is defined:
  518.  
  519.         define (
  520.                     greet (
  521.                  return ("hello")
  522.             )
  523.         )
  524.  
  525.     Then executing "print (greet ())" causes greet to be invoked,
  526.     it returns "hello" and so hello is printed.
  527.  
  528.     See also: case, do, exit, for, goto, if, label, leave, loop,
  529.           select, quit, until, while
  530.  
  531. rmdir (dirpath_str)
  532.  
  533.     Rmdir removes the directory specified by dirpath_str. The
  534.     directory must be empty.
  535.  
  536. seconds ()
  537.  
  538.     Seconds returns the number of seconds since some fixed time in
  539.     the past, such as January 1, 1980. This can be used for timing
  540.     events by subtracting the difference between two times in seconds.
  541.     It can also be formatted using day.
  542.  
  543.     See also: day, date, time
  544.  
  545. seek (fd_int offset_int origin_str)
  546.  
  547.     Seek positions to a specific byte (character) in a file. The next
  548.     read or write occurs from that location. The location is specified
  549.     by the combination of offset_int and origin_str. Offset_int is the
  550.     location relative to the specified origin_str. Possible values for
  551.     origin_str are:
  552.  
  553.         b - beginning of file
  554.         c - current position
  555.         e - end of file
  556.  
  557. select (
  558.     when (test_exp
  559.     block_fn
  560.     ...
  561.     )
  562.     ...
  563.     default (
  564.         block_fn
  565.         ...
  566.     )
  567. )
  568.  
  569.     Select is a flow of control construct. It is similar to the
  570.     case and if ... then ... else builtin functions. There is no
  571.     global condition as there is in case. Instead the first argument
  572.     of each "when" block is evaluated. If it returns TRUE the remainder
  573.     of the functions in the block are executed and control is transferred
  574.     to the function that follows the argument list terminator of the
  575.     select function. If none of the when blocks are executed the default
  576.     block is executed.
  577.  
  578.     See also: do, exit, for, goto, if, label, leave, loop,
  579.           return, quit, until, while
  580.  
  581. set (target_var... source_exp)
  582.  
  583.     Set assigns source_exp to each variable in the list of target
  584.     variables. It returns source_exp as well so that set can be used
  585.     as an assignment within another reference in the style of C. 
  586.  
  587.     Variables are usually defined the first time a value is stored
  588.     in them. A good way to define a variable and initialize it is to
  589.     use set it at the beginning of the user defined function that
  590.     references it.
  591.  
  592. sin (value_num)
  593.  
  594.     Sin returns the sine of its argument, value_num. The argument
  595.     should be expressed in radians. The result is in the range -1
  596.     to 1.
  597.  
  598. sqrt (value_num)
  599.  
  600.     Sqrt returns the square root of its argument.
  601.  
  602. static (new_var [size_int])
  603.  
  604.     Static allocates static storage for new_var. An optional size_int
  605.     argument may be used to specify the number of bytes (characters) to
  606.     allocate. If it is not specified then the current default data
  607.     storage unit (ds_unit) is allocated. Static storage can be used
  608.     for variables that must retain their values between calls to a
  609.     function. When the storage is no longer needed it should be freed
  610.     using the free builtin function so that it may be reused.
  611.  
  612.     See also: free, sys
  613.  
  614. strasc (value_str)
  615.  
  616.     Strasc returns the ascii code of the first character of its
  617.     argument, value_str.
  618.  
  619.     See also: strchr
  620.  
  621. strcat (arg_str arg_str...)
  622.  
  623.     Strcat returns the concatenation of its arguments. In other words,
  624.     a string is returned that is composed of each argument joined from
  625.     left to right without spaces.
  626.  
  627. strchr (ascii_int)
  628.  
  629.     Strchr returns a one character string which is the ascii 
  630.     representation of its argument.
  631.  
  632. strcpy (copy_str count_int)
  633.  
  634.     Strcpy returns a string composed of count_int instances of 
  635.     copy_str, i.e. copy_str is copied count_int times.
  636.  
  637. strfnd (source_str search_str)
  638.  
  639.     Strfnd returns the character position in source_str of the first
  640.     character in source_str that matches any of the characters in
  641.     search_str. This is the reverse of strver.
  642.  
  643.     Example:
  644.  
  645.         strfnd ("abc+def*ghi" "*+")
  646.  
  647.     Returns 4 because the first character in the first string that
  648.     matches any of the characters in the second string was 4, which
  649.     matched the "+" from the second string.
  650.  
  651. strind (source_str search_str)
  652.  
  653.     Strind returns the character position of the first occurence of
  654.     search_str in source_str.
  655.  
  656.     Example:
  657.  
  658.         strind ("a,an,the" "an")
  659.  
  660.     Returns 3 because the first occurence of the second argument in
  661.     the first is immediately following the first comma, at position 3.
  662.  
  663. strlc (arg_str)
  664.  
  665.     Strlc converts any uppercase (A-Z) characters in arg_str to
  666.     lowercase (a-z). Other characters are not changed.
  667.  
  668. strlen (arg_str)
  669.  
  670.     Strlen returns the number of characters in arg_str.
  671.  
  672. strsub (arg_str start_int [length_int])
  673.  
  674.     Strsub returns a substring of arg_str starting at the character
  675.     position specified by start_int for a length of length_int. If
  676.     length_int is not specified the remainder of the string is returned.
  677.  
  678. strtrn (source_str inputmap_str outputmap_str)
  679.  
  680.     Strtrn returns a string in which every occurence of a character
  681.     from inputmap_str in source_str has been translated to the
  682.     corresponding character from outputmap_str. It returns null if
  683.     inputmap_str and outputmap_str are not the same length.
  684.  
  685.     Example:
  686.  
  687.         strtrn ("cat" "abc" "xyz")
  688.  
  689.     Returns "zxt" because all a's (character position 1 in inputmap)
  690.     are translated to x's (character position 1 in outputmap), all
  691.     b's (character position 2 in inputmap) are translated to y's
  692.     (character position 2 in outputmap), all c's are translated to 
  693.     z's etc.
  694.  
  695. struc (arg_str)
  696.  
  697.     Struc converts any lowercase (a-z) characters in arg_str to
  698.     uppercase (A-Z). Other characters are not changed.
  699.  
  700. strver (source_str valid_str)
  701.  
  702.     Strver returns the position of the first character in source_str
  703.     that is not contained in valid_str or zero if all the characters
  704.     from source_str are contained in valid_str.
  705.  
  706. sub (arg_num...)
  707.  
  708.     Sub returns the difference of its arguments. Each argument is
  709.     subtracted from the one to its left. If only one argument is 
  710.     specifed then sub returns the argument minus one.
  711.  
  712. sys (sysvar_str [newval_int])
  713.  
  714.     Sys returns the value of the specified Max internal variable. If 
  715.     newval_int is specified then the system variable is set to the
  716.     new value. Possible values for sysvar_str are:
  717.  
  718.     sysalloc    action when a variable requires more storage
  719.                 0 - truncate
  720.                 1 - print message and allocate
  721.                 2 - allocate (default)
  722.                 3 - error, no assignment
  723.  
  724.     sysbrkchk    extended control c handling under dos
  725.                 0 - disable (for non pc-compatibles)
  726.                 1 - enable (default)
  727.  
  728.     syshide        builtin function name hiding by udf's
  729.                 0 - do not allow udf's with same name
  730.                 1 - allow udf's to hide bif's (default)
  731.  
  732.     sysinit        uninitialized variable handling
  733.                 0 - vars return name if not init (default)
  734.                 1 - vars raise error if not initialized
  735.  
  736.     sysprep        input preprocessing
  737.                 0 - no input preprocessing performed
  738.                 1 - input preprocessing performed (default)
  739.  
  740. system (command_str...)
  741.  
  742.     System passes each command in command_str to the shell for
  743.     execution. To invoke a DOS command shell use "COMMAND.COM" as
  744.     the command_str.
  745.  
  746. tan (arg_num)
  747.  
  748.     Tan returns the tangent of its argument. The argument
  749.     should be expressed in radians.
  750.  
  751. tclear ()
  752.  
  753.     Tclear clears the current transient level. Any builtin functions
  754.     defined since the last tset are cleared.
  755.  
  756.     See also: tset, tpush, tpop, tlevel
  757.  
  758. tell (fd_int)
  759.  
  760.     Tell returns the position in bytes (characters) of the current
  761.     read/write position from the beginning of the file specified by
  762.     the file descriptor fd_int.
  763.  
  764. time ()
  765.  
  766.     Time returns the current time in HH:MM:SS format.
  767.  
  768.     Where:    HH    Hours (0-23).
  769.         MM    Minutes (0-59).
  770.         SS    Seconds (0-59).
  771.  
  772.     See also: day, date, seconds
  773.  
  774. tlevel ()
  775.  
  776.     Tlevel returns the current transient level. It may be saved and
  777.     used later (perhaps after calling functions from a user defined
  778.     function library) in a call to tpop to return to the same level.
  779.  
  780.     See also: tset, tclear, tpush, tpop
  781.  
  782. tpop ([newlevel_int])
  783.  
  784.     Tpop returns to a previous transient level. If no argument is
  785.     specified then one level is popped, otherwise the specified level
  786.     is selected. No user defined functions are cleared from storage
  787.     until a tclear is executed at the new level. 
  788.  
  789.     See also: tset, tlcear, tpush, tlevel
  790.  
  791. tpush ()
  792.  
  793.     Tpush allocates a new transient level. Tset's and Tclear's can
  794.     be executed at the new level without affecting user defined
  795.     function definitions at previous levels. A user defined function
  796.     intended as a general purpose library routine can execute a tpush
  797.     and tset just after entry and execute a tpop and tclear just before
  798.     returning. This would clear any functions defined by the routine.
  799.  
  800.     See also: tset, tclear, tpop, tlevel
  801.  
  802. tset ()
  803.  
  804.     Tset saves the current user defined function state. New functions
  805.     may then be defined and a subsequent tclear will clear all of the
  806.     new functions from memory, back to the state that was present at
  807.     the time of the tset.
  808.  
  809.     See also: tclear, tpush, tpop, tlevel
  810.  
  811. udfbind (arg_udf)
  812.  
  813.     Udfbind binds the user defined function specified by arg_udf to
  814.     its internal address. It returns the internal address if the
  815.     function is defined, otherwise -1. It may be used to check on
  816.     the existence of a user defined function. Functions are normally
  817.     bound to their internal address the first time they are referenced.
  818.  
  819.     See also: bind, bifbind
  820.  
  821. udfdir (arg_udf...)
  822.  
  823.     Udfdir displays information about the user defined functions
  824.     specified in arg_udf... or all user defined functions if no
  825.     arguments are specified. The information includes the internal
  826.     address, the first step number in the function, the last step
  827.     number in the function and the maximum amount of storage
  828.     required for function return values and variables.
  829.  
  830. udfid (stepnum_int)
  831.  
  832.     Udfid identifies the user defined function associated with
  833.     the step number specified by the argument. It is useful in finding
  834.     the function associated with a step number displayed in a debug or
  835.     error message.
  836.  
  837. udflist (arg_udf [begstep_int [endstep_int]])
  838.  
  839.     Udflist lists the user defined function specified by arg_udf. If
  840.     only begstep_int is specified then only that step from the function
  841.     is listed. If begstep_int and endstep_int are specified then all
  842.     steps between them (inclusive) are listed. If no step number 
  843.     arguments are specified then the entire function is listed. 
  844.  
  845.     The user defined function is listed directly from its internal
  846.     representation, without comments, and in it a format that can
  847.     be derived from its structure.
  848.  
  849. unbind (arg_fn...)
  850.  
  851.     Unbind unbinds a previously bound function reference. The function
  852.     can be either a builtin function or a user defined function. Once
  853.     unbound, a function will be bound the next time it is invoked or
  854.     by the bind, bifbind or udfbind functions. The unbind function can
  855.     be used to switch the binding of a function name between builtin and
  856.     user defined functions or to bind to a new function that has just
  857.     been defined using eval or feval.
  858.  
  859.     See also: bind, bifbind, udfbind
  860.  
  861. until (bool_exp
  862.     [block_fn
  863.     ...]
  864. )
  865.  
  866.     Until is a flow of control construct. Each function in the list
  867.     of block_fn... is executed successively. After the last function is
  868.     executed the first argument is evaluated. If it returns FALSE the
  869.      list is re-executed. Iteration continues until it returns TRUE.
  870.     An until block is always executed at least once.
  871.  
  872.     The difference between until and while is that in until the test
  873.     for exiting the loop is at the bottom and based on TRUE whereas in
  874.     the while the test is at the top and the loop is not exited if
  875.     the value is FALSE. 
  876.  
  877.     See also: do, exit, for, goto, if, label, leave, loop,
  878.           return, select, quit, while
  879.  
  880. while (bool_exp
  881.     [block_fn
  882.     ...]
  883. )
  884.  
  885.     While is a flow of control construct. The first argument is
  886.     evaluated. If it returns TRUE then each function in the list
  887.     of block_fn... is executed. After the last function is executed
  888.     the first argument is evaluated again. Iteration continues until
  889.     it returns FALSE. A while block is not executed if the first
  890.     argument evaluates to FALSE on the first iteration.
  891.  
  892.     See also: do, exit, for, goto, if, label, leave, loop,
  893.           return, select, quit, until
  894.  
  895. window (cmd_int [args...])
  896.  
  897.     Window provides an interface to the MaxEdit integrated
  898.     environment. The first argument is a command. A preprocessor
  899.     definition file called windef.max has been created to define
  900.     a textual name for each of the commands. Windef.max should be
  901.     included (using the preprocessor $include(file) facility) in
  902.     any file that performs window operations. The following list
  903.     summarizes the window operations that are available and the
  904.     arguments that are required for each one.
  905.  
  906.     Command Arguments        Description
  907.  
  908.     These commands establish defaults for a subsequent open:
  909.  
  910.     (WLocation top left bot right)    ; Specify position for next open
  911.     (WBorder style)         ; border style (1 through 7)
  912.     (WText attributes)        ; set text attributes (see below)
  913.     (WBuffer buffersize linelength) ; specify max buffer and line length
  914.     (WTitle description)        ; title window
  915.     (WStyle attributes)        ; status line/popup window attributes
  916.  
  917.     The following commands access and modify windows:
  918.  
  919.     (WOpen )            ; returns window descriptor
  920.     (WClose wd)            ; close window
  921.     (WLink wd wd)            ; links two window descriptors
  922.     (WFile fd wd)            ; associates file w/window
  923.     (WCopy wd var)            ; copies contents of wd to var
  924.     (WGet wd var)            ; gets updateable copy
  925.     (WPut wd var)            ; restores updateable copy
  926.     (WInterpret wd)            ; passes window to Max
  927.     (WSend wd buf)            ; writes buf to wd
  928.     (WReceive wd buf)        ; reads buf from wd
  929.     (WPrompt promptchar)        ; sets prompt character
  930.     (WPosition wd row col)        ; positions to row & col
  931.     (WRefresh wd)            ; refresh window
  932.     (WErase wd)            ; erase window
  933.     (WClear)            ; clear entire screen
  934.     (WSetdp page)            ; set active display page (0-3)
  935.  
  936.     The remaining operations enable/disable/toggle the specified mode:
  937.  
  938.     (WInsert 1/0/-1)        ; insert mode
  939.     (WEdit 1/0/-1)            ; edit/input mode                ' 
  940.     (WOverflow 1/0/-1)        ; save/overflow mode
  941.     (WVerify 1/0/-1)        ; verify mode
  942.     (WStatus 1/0/-1)        ; status mode
  943.  
  944.     Keep in mind that the names WLocation, etc, are preprocessor
  945.     replacements defined in windef.max. If you do not use the names
  946.     you may use the numeric codes they represent (in the range 0 to 
  947.     26) but your functions may need to be changed with the next
  948.     release of Max.
  949.  
  950.     Attributes may be specified for WText and WStyle. These attributes
  951.     select the foreground and background style for text. The high order
  952.     four bits of the attribute specify the background color and the low
  953.     order four bits specify the foreground color, as follows:
  954.  
  955.         binary        description
  956.  
  957.         0001        blue
  958.         0010        green 
  959.         0100        red
  960.         1000        blinking (foreground)/intensity (background)
  961.  
  962.     So to get blue characters on a red background specify four high
  963.     order bits of 0100 (0x40) and four low order bits of 0001 (0x01)
  964.     for an attribute byte of 0x41. Remember to use the fmhex builtin
  965.     function to convert to decimal in the call:
  966.  
  967.         window (WText fmhex (0x41))
  968.  
  969.     Attributes can be combined additively. For example, to get blinking
  970.     green characters use green (0010) and blink (1000) for 1010 which
  971.     is 0x0a in hex.
  972.  
  973.     Many monochrome monitors only support white on black (0x07) and
  974.     black on white (0x70).
  975.  
  976.     There are eight border styles available for the WBorder command:
  977.  
  978.         1:    single width 
  979.         2:    double width
  980.         3:    single left/right, double top/bottom
  981.         4:    double left/right, single top/bottom
  982.         5:      single/double shadow
  983.         6:    bottom half of double sides and single top
  984.         7:    clear border
  985.         8:    top half of double sides and single bottom
  986.  
  987.     To select a double wide border for the window, for example, 
  988.     use "window (WBorder 2)." All subsequent opens will use the new
  989.     border style, until it is changed again.
  990.  
  991. write (fd_int buf_str [len])
  992.  
  993.     Write writes the file specified by fd_int from the buffer specifed
  994.     by buf_var. An optional length parameter, len_int, may be used to
  995.     specify the number of bytes (characters) to write. If the length
  996.     parameter is not specified then one line is written to the file.
  997.     This function return the number of bytes written, which may be less
  998.     than that requested if the storage media is full.
  999.  
  1000.     See also: open, close, read, seek, tell
  1001.  
  1002.