home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
rexx
/
library2
/
rxansi10
/
rxansi.doc
< prev
Wrap
Text File
|
1991-03-04
|
5KB
|
151 lines
RXANSI - Rexx eXtension for ANSI
Version 1.0
Steve Mullarkey
1-3-91
NOTICE
RXANSI is distributed as Shareware. This means that if you find
the product useful you must pay for it. Continued use of the
product after an evaluation period of 14 days is only allowed
once payment has been received.
To register RXANSI, send £15.00 to the following address ;
95 Greenville Drive,
Low Moor,
Bradford,
West Yorkshire,
England.
BD12 0PT.
Please make your cheque payable to 'S.Mullarkey'.
In return you will get the latest version on the disk media of
your choice plus you will be sent any major new releases.
The latest version is available from the following BBS's ;
The Mainframe BBS - (0274) 602788
TJD support BBS - (0535) 665345
Description.
RXANSI is a REXX extension for OS/2 1.2 EE and OS/2 1.3 SE. It was
developed due to the lack of power available in REXX to perform
screen I/O.
Native REXX has two commands available, namely 'SAY', which displays
a line of text followed by a CR/LF, and PULL, which displays a
blank line then a question mark before accepting user input. These
two commands tend to make REXX procedures look unprofessional.
The RXANSI extensions provide the following ;
o Move cursor to any point on the screen
o Display text without the CR/LF
o Get keystrokes a key at a time (including function keys,
Home, Insert etc)
o Change forground and background colours.
Installation.
To install RXANSI copy RXANSI.DLL to any directory on your LIBPATH.
Demonstration.
After the DLL has been put in a suitable directory, run RXANSI.CMD.
This briefly demonstrates what is available with the package.
Function Use.
RXANSI consists of four functions, these are ;
o RxAnsiInit() - enable use of ANSI screen controls
o GOTO(x,y) - position cursor at point x,y on the screen
o GetChar() - Return the next keyboard character
o PutChars(x) - Display characters x at the current cursor
position without a CR/LF.
Before any function can be used it must be registered with the REXX
interpreter. this is done by the following calls ;
CALL RxFuncAdd 'RxAnsiInit','RXANSI','RxAnsiInit'
CALL RxFuncAdd 'GoTo', 'RXANSI','GoTo'
CALL RxFuncAdd 'GetChar', 'RXANSI','GetChar'
CALL RxFuncAdd 'PutChars', 'RXANSI','PutChars'
After you have used the functions and before you exit the
procedure, you should de-register the functions as follows ;
CALL RxFuncDrop 'RxAnsiInit'
CALL RxFuncDrop 'GoTo'
CALL RxFuncDrop 'GetChar'
CALL RxFuncDrop 'PutChars'
Although this is not essential it is recommended.
Function Descriptions.
Name : RxAnsiInit()
Returns : OK if all OK
Function : This function sets variables in the REXX variable pool
to enable the following functions ;
Foreground colour Background colour
White On_White
Red On_Red
Cyan On_Cyan
Blue On_Blue
Magenta On_Magenta
Green On_Green
Yellow On_Yellow
Black On_Black
Also, the commands 'CLS' and 'Home' are provided.
Example : rc = RxAnsiInit()
SAY cls Red On_Black 'Hello World'
This would initialise ANSI support then the second
line would clear the screen and display the message
'Hello world' in red on a black background.
Name : GoTo(x,y)
Returns : OK if all OK
Function : This function moves the cursor to line x and column y.
Example : rc = GoTo(10,30)
This would place the cursor in the middle of the screen.
Name : GetChar()
Returns : Character value of next keystroke.
Function : This function waits for the next keystroke.
If a non-display key is hit the following could be
returned ;
F1-F12, ENTER, ESCAPE, DELETE, INSERT, HOME, END,
PAGEUP, PAGEDOWN, LEFT, RIGHT, UP, DOWN, BACKSPACE
or ERROR for anything else.
Example : ch = GetChar()
This would place the value of the next key hit in
variable ch.
Name : PutChars(x)
Returns : OK if all OK.
Function : This function displays the text x at the current cursor
location. A CR/LF is not added to the end.
Example : rc = PutChars('Hello World')
This would display 'Hello world' at the current cursor
location.
Suggestions.
Please send all queries or suggestions to the Mainframe BBS
(0274 - 602788).