home *** CD-ROM | disk | FTP | other *** search
/ Dream 44 / Amiga_Dream_44.iso / Amiga / programmation / Regina.lha / rexx.man < prev   
Text File  |  1997-08-27  |  13KB  |  396 lines

  1.  
  2.  
  3. rexx (1)               Commands and Applications                rexx (1)
  4.  
  5.  
  6.  
  7.  
  8. Name  
  9.         rexx - The Regina Rexx interpreter 
  10.  
  11. Syntax  
  12.         rexx [ options ] [ script [  scriptparams ]] 
  13.  
  14. Description  
  15.         Rexx  will  read  the  file named as  script and will assume the
  16.         contents of that file to be a Rexx  script  and  interpret  that
  17.         script.  Any parameters following  script will be interpreted as 
  18.         the parameters to the Rexx script.  If  script is not specified, 
  19.         the  Rexx  script to interpret will be read from standard input,
  20.         and interpretation will start when the  whole  script  has  been
  21.         read.  
  22.         If  `-' is specified as script then the script will be read from
  23.         standard input.  
  24.  
  25. Options  
  26.  
  27.         -tx  
  28.                 Starts interpretation with traceing set to "x".  If  you
  29.                 want  to run your program with tracing set to "all", you
  30.                 can use the option  -ta.  If  only    -t  is  specified,
  31.                 "all" is the trace mode set.  
  32.  
  33.         -i  
  34.                 Starts Regina  in  interactive  mode.  No script will be
  35.                 executed.  
  36.  
  37. Built-ins  
  38.         Below is a list of all the standard built-in functions in  Rexx.
  39.         For  a  more  complete  description  of  each  function, see the
  40.         documentation accompanying Regina.  
  41.  
  42.         ABBREV(long,short[,length])  
  43.                 Returns `1' or 0', depending on whether  `short'  is  an
  44.                 abbrevation of `long', or at least `length' characters.  
  45.  
  46.         ABS(number)  
  47.                 Returns the absolute value of `number'.  
  48.  
  49.         ADDRESS()  
  50.                 Returns the name of the current environment.  
  51.  
  52.         ARG([argno[,option]])  
  53.                 Without   parameters,   it   returns   the   number   of
  54.                 parameters.  If only `argno' is specified, it must be  a
  55.                 number, and that parameter is returned.  `Option' can be 
  56.                 either  `E'  or  `O',  and  then  either  `0'  or `1' is
  57.                 returned, depending on whether  the  numbered  parameter
  58.                 existed or was ommitted.  
  59.  
  60.         B2X(binstring)  
  61.  
  62.  
  63.  
  64. Wed Aug 27 08:16:38 1997                                          Page 1
  65.  
  66.  
  67.  
  68.  
  69. rexx (1)               Commands and Applications                rexx (1)
  70.  
  71.  
  72.  
  73.                 Converts the bin-string `binstring' to a hex-string.  
  74.  
  75.         BITAND(string1[,[string2][,padchar]])  
  76.                 Returns  a  string  which  is the bitwise AND of its two
  77.                 first parameters.  The shorter  string  is  padded  with
  78.                 `padchar'.  
  79.  
  80.         BITOR(string1[,[string2][,padchar]])  
  81.                 Like `BITAND' but uses logical OR.  
  82.  
  83.         BITXOR(string1[,[string2][,padchar]])  
  84.                 Like `BITAND' but uses logical XOR.  
  85.  
  86.         C2D(string[,length])  
  87.                 Converts  the  character  string  `string'  to a decimal
  88.                 number.  `Length' specifies the number of characters  in
  89.                 `string' to convert.  
  90.  
  91.         C2X(string)  
  92.                 Converts the character string `string' to a hex-string.  
  93.  
  94.         CENTER(string,length[,padchar])  
  95.  
  96.         CENTRE(string,length[,padchar])  
  97.                 Centers  `string'  in  a  string of `length' characters,
  98.                 using `padchar' for padding, if neccessary.  
  99.  
  100.         CHARIN([streamid][,[start][,length]])  
  101.                 Read `length' (default is 1) characters  from  an  input
  102.                 stream   (default   is   the   standard  input  stream),
  103.                 optionally starting at position `start' (default is  the
  104.                 current read position).  
  105.  
  106.         CHAROUT([streamid][,[string][,start]])  
  107.                 Writes  `stream'  to  an  output  stream (default is the
  108.                 standard output stream), starting  at  position  `start'
  109.                 (default is the current write position).  
  110.  
  111.         CHARS([streamid])  
  112.                 Returns  the  number  of  characters  left  in the input
  113.                 stream (default is the standard input stream).  
  114.  
  115.         COMPARE(string1,string2[,padchar])  
  116.                 Returns `0' or `1', depending on whether the two strings 
  117.                 are equal.  The shorter string is padded with `padchar', 
  118.                 or space if padchar is ommitted.  
  119.  
  120.         CONDITION([option])  
  121.                 Performs  various  operations  on  streams,  see   other
  122.                 documentation.  
  123.  
  124.         COPIES(string,copies)  
  125.                 Returns `copies' copies of the string `string'.  
  126.  
  127.  
  128.  
  129.  
  130. Wed Aug 27 08:16:38 1997                                          Page 2
  131.  
  132.  
  133.  
  134.  
  135. rexx (1)               Commands and Applications                rexx (1)
  136.  
  137.  
  138.  
  139.         DATATYPE(string[,option])  
  140.                 Returns  the  datatype  of  `string':  `NUM'  if it is a
  141.                 number, `LIT' if it is as valid literal  that  does  not
  142.                 have  a  variable  value, `VAR' if it is a variable, and
  143.                 `BAD' otherwise.  If `option' is specified, it  must  be
  144.                 one  of  these  four,  and  then `0' or `1' is returned,
  145.                 depending on whether `string' is of the named type.  
  146.  
  147.         DATE([option])  
  148.                 Returns the date, in various formats, which can be Base, 
  149.                 Century,  Days,  European,   Month,   Normal,   Ordered,
  150.                 Standard, USA, or Weekday.  
  151.  
  152.         DELSTR(string,start[,length])  
  153.                 Deletes  the  substring of `string' starting at position
  154.                 `start' and having a length of `length' (default is  the
  155.                 rest of the string).  
  156.  
  157.         DELWORD(string,start[,length])  
  158.                 Deletes  `length'  words  (default  is  the  rest of the
  159.                 string) from `string', starting at word number `start' 
  160.  
  161.         DIGITS()  
  162.                 Returns the current setting of NUMERIC DIGITS.  
  163.  
  164.         D2C(integer[,length])  
  165.                 Converts the decimal number  `integer'  to  a  character
  166.                 string of length `length'.  
  167.  
  168.         D2X(integer[,length])  
  169.                 Converts the decimal number `integer' to a hex-string of 
  170.                 length `length'.  
  171.  
  172.         ERRORTEXT(errno)  
  173.                 Returns  the  error  text  associated  with error number
  174.                 `errno'.  
  175.  
  176.         FORM()  
  177.                 Returns the current setting of NUMERIC FORM.  
  178.  
  179.         FORMAT(number[,[before][,[after][,[expp][,[expt]]]]])  
  180.                 Formats `number' into a string  having  `before'  digits
  181.                 before and  `after' digits after the decimal point.  The
  182.                 `expp'  and  `expt'  governs  how  and   when   to   use
  183.                 exponential form.  
  184.  
  185.         FUZZ()  
  186.                 Returns the current setting of NUMERIC FUZZ.  
  187.  
  188.         INSERT(string1,string2[,position[,length[,padchar]]])  
  189.                 Inserts  `string1' into `string2' at position `position'
  190.                 and with a length of `length'.  
  191.  
  192.         LASTPOS(needle,haystack[,start])  
  193.  
  194.  
  195.  
  196. Wed Aug 27 08:16:38 1997                                          Page 3
  197.  
  198.  
  199.  
  200.  
  201. rexx (1)               Commands and Applications                rexx (1)
  202.  
  203.  
  204.  
  205.                 Seeks for `needle' in `haystack', from the  end  towards
  206.                 the start.  
  207.  
  208.         LEFT(string,length[,padchar])  
  209.                 Returns the `length' leftmost characters in `string' 
  210.  
  211.         LENGTH(string)  
  212.                 Returns the number of characters in `string'.  
  213.  
  214.         LINEIN([streamid][,[line][,count]])  
  215.                 Reads  a  line  from  an  input  stream  (default is the
  216.                 standard input stream), optionally starting  at  `line'.
  217.                 If  `count'  is  zero,  no  reading  is  performed (only
  218.                 repositioning).  
  219.  
  220.         LINEOUT([streamid][,[string][,line]])  
  221.                 Writes the line `string' to an output stream (default is 
  222.                 the  standard  output  stream,  optionally  starting  at
  223.                 `line'.  
  224.  
  225.         LINES([streamid])  
  226.                 Returns  the  number  of complete lines left in an input
  227.                 stream.  
  228.  
  229.         MAX(number1[,number2]...)  
  230.                 Returns the maximum of its parameters.  
  231.  
  232.         MIN(number[,number]...)  
  233.                 Returns the minimum of its parameters.  
  234.  
  235.         OVERLAY(string1,string2[,[start][,[length][,padchar]]])  
  236.                 Overwrites `string2' with contents of `string1'.  
  237.  
  238.         POS(needle,haystack[,start])  
  239.                 Seeks for first occurrence of `needle' in `haystack'.  
  240.  
  241.         QUEUED()  
  242.                 Returns the number of lines in the external  data  queue
  243.                 (stack).  
  244.  
  245.         RANDOM(max)  
  246.  
  247.         RANDOM([min][,[max][,seed]])  
  248.                 Returns  a  random  number  in  the range `min' to `max'
  249.                 (default is 0 and 100000).  
  250.  
  251.         REVERSE(string)  
  252.                 Reverses the order of the characters in `string'.  
  253.  
  254.         RIGHT(string,length[,padchar])  
  255.                 Returns the `length' rightmost characters in `string'.  
  256.  
  257.         SIGN(number)  
  258.                 Returns `-1', `0', or `1',  depending  on  the  sign  of
  259.  
  260.  
  261.  
  262. Wed Aug 27 08:16:38 1997                                          Page 4
  263.  
  264.  
  265.  
  266.  
  267. rexx (1)               Commands and Applications                rexx (1)
  268.  
  269.  
  270.  
  271.                 `number'.  
  272.  
  273.         SOURCELINE([lineno])  
  274.                 Returns  the  number  of  lines  in  the  source for the
  275.                 current script, or the line specified by `lineno'.  
  276.  
  277.         SPACE(string[,[length][,padchar]])  
  278.                 Transform  any  sequence  of  spaces  in  `string'  into
  279.                 exactly  `length'  spaces,  and  strips  off leading and
  280.                 trailing spaces.  
  281.  
  282.         STEAM(streamid[,option[,command]])  
  283.                 Returns infomation about a  stream,  valid  options  are
  284.                 `Command',   `Description',   and   `State'.  See  other
  285.                 documentation for more information.  
  286.  
  287.         STRIP(string[,[option][,char]])  
  288.                 Strips  leading  and  trailing  `char's  off   `string'.
  289.                 `Option' can be Leading, Trailing, or Both.  
  290.  
  291.         SUBSTR(string,start[,[length][,padchar]])  
  292.                 Returns  the  substring  of `string' starting at `start'
  293.                 and having length `length'.  
  294.  
  295.         SUBWORD(string,start[,length])  
  296.                 Returns a subsequence of `length'  words  from  `string'
  297.                 starting at `start'.  
  298.  
  299.         SYMBOL(name)  
  300.                 Test whether `name' is a numbol, variable, literal.  
  301.  
  302.         TIME([option])  
  303.                 Returns  the  time,  options  are Civil, Elapsed, Hours,
  304.                 Long, Minutes, Normal, Reset, and Seconds.  
  305.  
  306.         TRACE([setting])  
  307.                 Returns the current trace setting, and optionally sets a 
  308.                 new one.  
  309.  
  310.         TRANSLATE(string[,[tablein][,[tableout][,padchar]]])  
  311.                 Translates characters  in  `string'  from  `tablein'  to
  312.                 `tableout'.  
  313.  
  314.         TRUNC(number[,length])  
  315.                 Truncates `number' to `length' decimals.  
  316.  
  317.         VALUE(symbol[,[value],[pool]])  
  318.                 Returns  the value of `symbol', optionally setting it to
  319.                 `value' afterwards.  
  320.  
  321.         VERIFY(string,ref[,[option][,start]])  
  322.                 Verifies that  `strings'  consists  of  characters  from
  323.                 `ref',  and  returns  the  first character that does not
  324.                 match.  `Option' can be Match or Nomatch.  
  325.  
  326.  
  327.  
  328. Wed Aug 27 08:16:38 1997                                          Page 5
  329.  
  330.  
  331.  
  332.  
  333. rexx (1)               Commands and Applications                rexx (1)
  334.  
  335.  
  336.  
  337.         WORD(string,wordno)  
  338.                 Returns word number `wordno' in `string'.  
  339.  
  340.         WORDINDEX(string,wordno)  
  341.                 Returns the character position of word nun 
  342.  
  343.         WORDLENGTH(string,wordno)  
  344.                 Returns the length of word number `wordno' in `string'.  
  345.  
  346.         WORDPOS(phrase,string[,start])  
  347.                 Returns the word position of the start  of  `phrase'  in
  348.                 `string'.  
  349.  
  350.         WORDS(string)  
  351.                 Returns the number of words in `string'.  
  352.  
  353.         XRANGE([start][,end])  
  354.                 Returns  in  alphabetic  order all the characters in the
  355.                 character  set  from  the  character  `start'   to   the
  356.                 character `end'.  
  357.  
  358.         X2B(hexstring)  
  359.                 Converts the hex-string `hexstring' to a bin-string.  
  360.  
  361.         X2C(hexstring)  
  362.                 Converts  the  hex-string  `hexstring'  to  a  character
  363.                 string.  
  364.  
  365.         X2D(hexstring[,length])  
  366.                 Converts  the  `length'  rightmost  characters  of   the
  367.                 hex-string `hexstring' to a decimal number.  
  368.  
  369. Copyright  
  370.         The  Regina Rexx interpreter is distributed under the GNU Public
  371.         Lisence,  see  the   file   `COPYING'   in   the   source   code
  372.         distribution.  
  373.  
  374. Author  
  375.                 <anders@lise.unit.no>.  
  376.  
  377. See Also  
  378.         There are several good reference books on Rexx. The most  famous
  379.         is  "The  Rexx  Language"  by  Mike Cowlishaw. Documentation for
  380.         Regina is located in the directory  `doc'  in  the  source  code
  381.         distribution.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393. Wed Aug 27 08:16:38 1997                                          Page 6
  394.  
  395.  
  396.