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