home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / rexx / library2 / rxansi10 / rxansi.doc < prev   
Text File  |  1991-03-04  |  5KB  |  151 lines

  1.                                      RXANSI - Rexx eXtension for ANSI
  2.                                                           Version 1.0
  3.                                                       Steve Mullarkey
  4.                                                                1-3-91
  5.  
  6.  
  7.                                NOTICE
  8.  
  9.  
  10.      RXANSI is distributed as Shareware.  This means that if you find
  11.      the product useful you must  pay  for it.  Continued use  of the
  12.      product after an  evaluation period of  14 days  is only allowed
  13.      once payment has been received.
  14.      To register RXANSI, send £15.00 to the following address ;
  15.  
  16.               95 Greenville Drive,
  17.               Low Moor,
  18.               Bradford,
  19.               West Yorkshire,
  20.               England.
  21.               BD12 0PT.
  22.  
  23.      Please make your cheque payable to 'S.Mullarkey'.
  24.  
  25.      In return you will get the latest version on the disk media of
  26.      your choice plus you will be sent any major new releases.
  27.  
  28.      The latest version is available from the following BBS's ;
  29.  
  30.          The Mainframe BBS - (0274) 602788
  31.          TJD support BBS   - (0535) 665345
  32.  
  33.  
  34. Description.
  35.    RXANSI is a REXX extension for OS/2 1.2 EE and OS/2 1.3 SE. It was
  36.    developed due to the lack of power available in REXX to perform
  37.    screen I/O.
  38.  
  39.    Native REXX has two commands available, namely 'SAY', which displays
  40.    a line of text followed by a CR/LF, and PULL, which displays a
  41.    blank line then a question mark before accepting user input. These
  42.    two commands tend to make REXX procedures look unprofessional.
  43.  
  44.    The RXANSI extensions provide the following ;
  45.       o  Move cursor to any point on the screen
  46.       o  Display text without the CR/LF
  47.       o  Get keystrokes a key at a time (including function keys,
  48.          Home, Insert etc)
  49.       o  Change forground and background colours.
  50.  
  51. Installation.
  52.    To install RXANSI copy RXANSI.DLL to any directory on your LIBPATH.
  53.  
  54. Demonstration.
  55.   After the DLL has been put in a suitable directory, run RXANSI.CMD.
  56.   This briefly demonstrates what is available with the package.
  57.  
  58. Function Use.
  59.   RXANSI consists of four functions, these are ;
  60.     o  RxAnsiInit() - enable use of ANSI screen controls
  61.     o  GOTO(x,y)    - position cursor at point x,y on the screen
  62.     o  GetChar()    - Return the next keyboard character
  63.     o  PutChars(x)  - Display characters x at the current cursor
  64.                       position without a CR/LF.
  65.  
  66.   Before any function can be used it must be registered with the REXX
  67.   interpreter. this is done by the following calls ;
  68.  
  69.   CALL RxFuncAdd 'RxAnsiInit','RXANSI','RxAnsiInit'
  70.   CALL RxFuncAdd 'GoTo',      'RXANSI','GoTo'
  71.   CALL RxFuncAdd 'GetChar',   'RXANSI','GetChar'
  72.   CALL RxFuncAdd 'PutChars',  'RXANSI','PutChars'
  73.  
  74.   After you have used the functions and before you exit the
  75.   procedure, you should de-register the functions as follows ;
  76.  
  77.   CALL RxFuncDrop 'RxAnsiInit'
  78.   CALL RxFuncDrop 'GoTo'
  79.   CALL RxFuncDrop 'GetChar'
  80.   CALL RxFuncDrop 'PutChars'
  81.  
  82.   Although this is not essential it is recommended.
  83.  
  84.  
  85. Function Descriptions.
  86.  
  87.   Name     : RxAnsiInit()
  88.   Returns  : OK if all OK
  89.   Function : This function sets variables in the REXX variable pool
  90.              to enable the following functions ;
  91.  
  92.                Foreground colour   Background colour
  93.                      White           On_White
  94.                      Red             On_Red
  95.                      Cyan            On_Cyan
  96.                      Blue            On_Blue
  97.                      Magenta         On_Magenta
  98.                      Green           On_Green
  99.                      Yellow          On_Yellow
  100.                      Black           On_Black
  101.  
  102.              Also, the commands 'CLS' and 'Home' are provided.
  103.  
  104.   Example  : rc = RxAnsiInit()
  105.              SAY cls Red On_Black 'Hello World'
  106.  
  107.              This would initialise ANSI support then the second
  108.              line would clear the screen and display the message
  109.              'Hello world' in red on a black background.
  110.  
  111.  
  112.  
  113.   Name     : GoTo(x,y)
  114.   Returns  : OK if all OK
  115.   Function : This function moves the cursor to line x and column y.
  116.  
  117.   Example  : rc = GoTo(10,30)
  118.  
  119.              This would place the cursor in the middle of the screen.
  120.  
  121.  
  122.   Name     : GetChar()
  123.   Returns  : Character value of next keystroke.
  124.   Function : This function waits for the next keystroke.
  125.              If a non-display key is hit the following could be
  126.              returned ;
  127.  
  128.              F1-F12, ENTER, ESCAPE, DELETE, INSERT, HOME, END,
  129.              PAGEUP, PAGEDOWN, LEFT, RIGHT, UP, DOWN, BACKSPACE
  130.              or ERROR for anything else.
  131.  
  132.   Example  : ch = GetChar()
  133.  
  134.              This would place the value of the next key hit in
  135.              variable ch.
  136.  
  137.  
  138.   Name     : PutChars(x)
  139.   Returns  : OK if all OK.
  140.   Function : This function displays the text x at the current cursor
  141.              location. A CR/LF is not added to the end.
  142.  
  143.   Example  : rc = PutChars('Hello World')
  144.  
  145.              This would display 'Hello world' at the current cursor
  146.              location.
  147.  
  148. Suggestions.
  149.   Please send all queries or suggestions to the Mainframe BBS
  150.   (0274 - 602788).
  151.