flag.
Output will be stderr.
XTRACE or XTRACE -1 will disable internal tracing.
XTRACE 2 will have the same effect as specifiing -t2 on command line
SHOWTASK
SHOWTASK
Output informations about Eloquence tasks to SYSTEM PRINTER.
SHOWTASK
TASK OWNER STAT UID NAME PID
---- ----- ---- ----- --------- -----
12 0 0 Y 102 mike 27624
15 12 0 N 102 mike 27625
16 12 0 N 102 mike 27626
TASK |
Task number |
OWNER |
Owner if secondary task or 0 |
STAT |
TSTAT of taskid and attached flag (Y=attached to terminal) |
UID |
HP-UX user id |
NAME |
HP-UX user name |
PID |
eloqcore process id |
XASSIGN
XASSIGN #fno TO fname;type
[,assign_options ... ]
ASSIGN file of given type.
It's not possible to ASSIGN a file which has no extension
of DATA. Now it's possible with the XASSIGN statement.
type could be any HP260 file type (e.g. DATA, PROG, FORM ...).
If type is OTHR then NO extension will be added to filename.
XASSIGN #1 TO "/etc/passwd";OTHR
will assign #1 to /etc/passwd.
XPURGE
XPURGE fname [;type]
PURGE file of given type
If you want to remove a file which is not of type DATA you have
to enter a statement like this:
COMMAND "!rm "&MAPVOL$("CODE")&"WILLI.PROG"
with XPURGE you would enter simply:
XPURGE "WILLI,CODE";PROG
If type is omitted, it defaults to DATA.
So PURGE "WF1" and XPURGE "WF1" are equivalent.
If type is OTHR then NO extension will be added to filename.
e.g. XPURGE "WILLI";OTHR
will purge the file WILLI.
QUIT
-
QUIT
-
Terminate Eloquence, warning if program modified but
not saved yet.
-
QQUIT
-
Terminate Eloquence, don't concern about unsaved program.
----------------------------
| WARNING |
| |
| Program changed ! |
| You are about leaving |
| HP ELOQUENCE w/o saving |
| your actual program. |
| |
| Select QUIT to terminate |
| HP ELOQUENCE. |
| |
| [QUIT] [CANCEL] |
----------------------------
Eloquence environment
-
MMSPEC$
-
'device' specification of MSI device
e.g. 'C2,4,0'
-
LDSPEC$
-
'device' specification of current program LOAD device
e.g. 'C2,4,0'
-
PNTR
-
current 'PRINTER IS'
Will return current printer number or
-3 |
if PRINTER IS "SPOOLFILE" |
-6 |
if PRINTER IS STDOUT |
-7 |
if PRINTER IS STDERR |
-8 |
if PRINTER IS TTY |
-9 |
if PRINTER IS CONSOLE |
HP-UX environment
-
BACKGROUND
-
returns 1 if executing in background (stdout redirected or -b switch
on commandline). Implies NO OPERATOR.
-
NO OPERATOR
-
returns 1 if executing in bach mode (stdin redirected).
-
MAPVOL$(Volspec$)
-
returns hp-ux path of mapped volume name or device specifier
-
GETENV$(Env_name$)
-
returns value of environment variable
-
REVISION$
-
returns eloquence revision
-
PID, PPID
-
returns process/parent process id
CRTCOLS, CRTLINES
CRTCOLS
CRTLINES
Returns terminal geometry.
With HP-UX you are no longer limited to terminals with 80*24
dimension (e.g. XWINDOWS or you switch your 700/92 to 132 COLUMNS).
Eloquence will use this additional space on screen.
To let the application take advantage of this, the screen dimensions
may be retrieved by this functions.
CRTCOLS returns the number of COLUMNS (usual 80) and
CRTLINES returns the number of LINES (usual 24).
This is a more portable way than coding constants like "24" or "80"
in programs or checking environment variables.
MAPPNTR
MAPPNTR$(printer)
Returns printer mapping.
This makes sense if you use TIO and you want to configure
the device using stty because PORT number may be configured
to any devicefile.
Return values:
NONEXISTENT |
printer is not available |
INTERNAL |
printer is 9 or 10 (and local printer available) |
PIPE |
printer is mapped to a pipe |
/dev/... |
printer is mapped to a (device-)file |
It may also be used to check for existing printers.
Example program sequence:
COMMAND "!stty 2400 icanon <"&MAPPNTR$(15)
This will configure device mapped to PRINTER/PORT 15 to use
icanon mode at 2400 baud.
ERRMSG$
ERRMSG$(Error number)
returns error description of given error number
The error message are located in the message catalog file
eloq.cat which will be located at the standard NLS path.
For example:
DISP ERRMSG$(2)
"Memory overflow"
Error handling:
ERRMSG$ wont raise program error if either message or message
catalog could not be found to avoid looping in the error handler.
Instead it will return an error message which will contain the
error number and an descriptive text where '#' will replaced by
the error number parameter:
(ERR#): Message catalog not found
(ERR#): Error message not found
KBCODE
KBCODE
Waits for a key and returns internal code of key.
This internal code is simply the ROMAN8 code ('A' = 65) for all
non function keys. All Function keys return codes of 256 + id
(e.g. F1 = 265, F2 = 266 ... as defined by curses).
In this example program you could use normal keys like softkeys:
DISP "Select option (1 .. 3 or E)"
LOOP
K = KBCODE
EXIT IF CHR$(K)="E"
SELECT CHR$(K)
CASE "1","2","3":
DISP "-> option ";K-NUM("0")
CASE ELSE
BEEP
END SELECT
END LOOP
END
This is a more complex example. It could be used as a replacement
of the ACCEPT statement. It will maintain an edit string of given
length. For each character you enter a '*' is output. You could
correct yout input with the BACKSPACE key. Input will be finished
if you either press RETURN key or if you entered Max_len
characters:
DEF FNAccept$(Max_len)
DIM A$[Max_len]
LOOP
C=KBCODE
SELECT C
CASE 13 ! CR
EXIT IF 1
CASE 0 TO 7,9 TO 12,14 TO 31,>127 ! CONTROL
BEEP
CASE 8 ! BACKSPACE
IF LEN(A$) THEN
A$=A$[1,LEN(A$)-1]
DISP "~ ~"; ! "BS SPACE BS"
ELSE
BEEP
END IF
CASE ELSE ! CHARACTER
A$=A$&CHR$(C)
DISP "*";
IF LEN(A$)=Max_len THEN
BEEP
EXIT IF 1
END IF
END SELECT
END LOOP
RETURN A$
FNEND
XOWNID
XOWNID
Returns owner of given task id
For example:
XOWNID(15)
will return owner of TASK 15
or zero if either orimary task or not REQUESTed.
RANDOMIZE
RANDOMIZE start_value
This will reset the (pseudo-) random number generator to a new
starting value.
If the start value is omitted, random number generator starting value
is derived from actual system time.
If the optinal start value is given, it will first be converted to
an integer value and then the lower 48 bits of it will be used to
initialize random number generation.
HOP
HOP line spec
HOP will resume execution until reaching either the next line
if is not specified or the line optional specified.
Execution will stop before executing line.
This is a advantage in debugging process, because functions,
subprograms and loops may be executed and execution stops
after processing.
HOP is only available in eloquence DVP product.
Example:
10 FOR I=1 TO 10
20 X=X+I
30 NEXT I
40 DISP X
50 END
HOP 30 will resume execution until reaching line 30.
Line 30 will be displayed.
Entering HOP will continue execution until line 40 is to be executed.