| Previous | Contents | Index |
10 PRINT 'About to print to my printer port'
20 SET PORT ON
PRINT 'This is on the printer port'
SET PORT OFF
30 PRINT 'Back to the screen again'
40 END
RNH
About to print to my printer port
Back to the screen again
|
Allows a program to use an attached printer port on a terminal.
SET PORT ON | OFF turns the printer port ON or OFF. SET PORT ON turns on the attached port. SET PORT OFF turns off the attached port.
To indicate the type of printer that is attached to the terminal's printer port, you can use the symbol TTI_PRINTER_TYPE.
To set up the printer type, enter the following at the system prompt (DCL level):
$ TTI_PRINTER_TYPE == 'printer_type'
|
where "printer_type" is one of the following:
Example: $ TTI_PRINTER_TYPE :=,= 'HP'
If the symbol is not defined, the type DEC is assumed.
If a terminal has a non-DEC printer port, no escape sequences are sent to the printer when you print to the printer port.
SET PORT OFF
|
10 PRINT 'About to print to my printer port'
20 SET PORT ON
PRINT 'This is on the printer port'
SET PORT OFF
30 PRINT 'Back to the screen again'
40 END
RNH
About to print to my printer port
Back to the screen again
|
Disable printing to an attached printer port on a terminal.
SET PORT OFF turns off the attached port.
ASK RESPONSES num_var
|
10 INPUT 'Please enter your name': name$
INPUT 'What day is this': what_day$
PRINT 'Hello '; name$
PRINT 'Have a good '; what_day$
20 ASK RESPONSES answers
PRINT
PRINT 'Responses:'; answers
30 END
RNH
Please enter your name? Ginger
What day is this? Wednesday
Hello Ginger
Have a good Wednesday
Responses: 2
|
ASK RESPONSES asks for the number of completed input responses.
SET SCROLL num_expr1, num_expr2
|
10 FRAME OFF
PRINT AT 21, 1: 'This text will not scroll.'
SET SCROLL 5, 20
PRINT AT 20, 1:;
DELAY 1
PRINT 'This'
DELAY 1
PRINT 'text'
DELAY 1
PRINT 'will'
DELAY 1
PRINT 'scroll.'
DELAY 1
20 SET SCROLL 1,24
30 END
RNH
This
text
will
scroll
This text will not scroll.
|
This statement sets up a scrolling region from line num_expr1 to line num_expr2.
ASK SEED num_var
SET SEED num_expr
|
10 RANDOMIZE
ASK SEED seed_num
FOR i = 1 TO 3
PRINT RND(1000)
NEXT i
PRINT 'Reset the random sequence'
SET SEED seed_num
FOR i = 1 TO 3
PRINT RND(1000)
NEXT i
20 END
RNH
608
88
506
Reset the random sequence
608
88
506
|
Allows you to set or reset the pseudo-random number sequence.
ASK SEED returns the current starting point of a pseudo-random sequence and stores the number in num_var.
SET SEED sets the starting point of a pseudo-random sequence with the number in num_expr.
9.15 ASK | SET SYSTEM
There are a number of ASK SYSTEM and SET SYSTEM statements. These are
described in the following sections. The ASK/SET statements ask about
and set various system operation features.
ASK SYSTEM: COMMENT str_var
|
10 SET SYSTEM: COMMENT 'Invoice Entry'
20 ASK SYSTEM: COMMENT c$
30 PRINT c$
40 END
RNH
Invoice Entry
|
The ASK SYSTEM: COMMENT statement asks for the INTOUCH operating system comment for the process.
SET SYSTEM: COMMENT str_expr
|
10 SET SYSTEM: COMMENT 'Invoice Entry'
20 ASK SYSTEM: COMMENT c$
30 PRINT c$
40 END
RNH
Invoice Entry
|
The SET SYSTEM: COMMENT statement loads the INTOUCH operating system comment area with the specified string. This statement can be used in combination with the TTI_RUN:ISHOW.COM command procedure. The INTOUCH program sets the comment to some text, such as the name of the specific routine being executed. When you run TTI_RUN:ISHOW.COM, you see the specific INTOUCH program and routine within that program being run by all INTOUCH users.
ASK SYSTEM: DIRECTORY str_var
|
10 ASK SYSTEM: DIRECTORY z$
PRINT 'Current directory is: '; z$
20 END
RNH
Current directory is: USER:[PAYROLL]
|
ASK SYSTEM: DIRECTORY asks the operating system for the current default device and directory.
SET SYSTEM: DIRECTORY str_var
|
10 ASK SYSTEM: DIRECTORY z0$
PRINT 'Current directory '; z0$
SET SYSTEM: DIRECTORY 'SYS$LOGIN'
ASK SYSTEM: DIRECTORY z1$
PRINT 'Directory set to '; z1$
DELAY 2
SET SYSTEM: DIRECTORY z0$
PRINT 'Directory set back to '; z0$
20 END
RNH
Current directory USER:[TESTER.INTOUCH]
Directory set to USER:[TESTER]
Directory set back to USER:[TESTER.INTOUCH]
|
SET SYSTEM: DIRECTORY sets the default device and directory.
9.15.5 ASK SYSTEM, LOGICAL: VALUE
ASK SYSTEM, LOGICAL str_expr: VALUE str_var
|
10 ASK SYSTEM, LOGICAL "SYS$SCRATCH": VALUE scr$
20 PRINT '"SYS$SCRATCH" points to: '; scr$
30 END
RNH
"SYS$SCRATCH" points to: USER:[TESTER]
|
ASK SYSTEM, LOGICAL asks the operating system to translate the logical name in str_expr and place the result into the variable specified by str_var.
9.15.6 SET SYSTEM, LOGICAL: VALUE
SET SYSTEM, LOGICAL str_expr1: VALUE str_expr2
|
10 SET SYSTEM, LOGICAL 'SYS$SCRATCH': VALUE 'USER:[TESTER]'
ASK SYSTEM, LOGICAL 'SYS$SCRATCH': VALUE z$
PRINT 'Logical set to '; z$
20 END
RNH
Logical set to USER:[TESTER]
|
This statement sets the operating system logical name in str_expr1 to the value in str_expr2.
ASK SYSTEM: MODE str_var
|
10 ASK SYSTEM: MODE process_mode$
20 PRINT 'Process Mode: '; process_mode$
30 END
RNH
Process mode: INTERACTIVE
|
This statement returns the mode of the process which is one of the following:
ASK SYSTEM: PARAMETER str_var
|
1 PROGRAM test_param.int
10 ASK SYSTEM: PARAMETER pdata$
20 PRINT 'Parameter was: '; pdata$
30 END
INTOUCH
SAVE 'test_param'
INTOUCH
parameter
------------
| |
$ INTOUCH/SOURCE test_param show parameter
Parameter was: SHOW PARAMETER
INTOUCH
|
ASK SYSTEM: PARAMETER returns any parameter from the command line given after the program name and places it in str_var.
ASK SYSTEM: PARAMETER lets you obtain the command line that invoked INTOUCH. The statement gives you the part of the command line after the program name.
9.15.9 ASK SYSTEM, PASS: SUCCESS
ASK SYSTEM, PASS: SUCCESS num_var
|
10 OPEN #1: NAME 'report.lis', ACCESS OUTPUT
PRINT #1: 'sample report'
CLOSE #1
PASS 'PRINT/HOLD REPORT.LIS'
ASK SYSTEM, PASS: SUCCESS okay
IF okay THEN
PRINT 'Report queued for printing'
ELSE
PRINT 'Unable to queue report for printing'
END IF
20 END
RNH
Report queued for printing
|
This statement asks the operating system to return a TRUE (1) if true or FALSE (0) if false indicating whether or not the last PASS command executed successfully.
ASK SYSTEM: PROCESS str_var
|
10 ASK SYSTEM: PROCESS process$
20 PRINT 'Process is: '; process$
30 END
RNH
Process is: TESTER_13B_3
|
ASK SYSTEM: PROCESS str_var asks the operating system for the current process name.
SET SYSTEM: PROCESS str_expr
|
10 ASK SYSTEM: PROCESS process$
curr_process$ = process$
PRINT 'Current process is: '; curr_process$
20 new_process$ = 'DO_TEST'
SET SYSTEM: PROCESS new_process$
ASK SYSTEM: PROCESS process$
PRINT 'New process is: '; process$
30 SET SYSTEM: PROCESS curr_process$
ASK SYSTEM: PROCESS process$
PRINT 'Old process restored: '; process$
40 END
RNH
Current process is: TESTER_13B_3
New process is: DO_TEST
Old process restored: TESTER_13B_3
|
SET SYSTEM: PROCESS str_expr changes the operating system process name to str_expr.
ASK SYSTEM: RIGHTS str_var
|
10 ASK SYSTEM: RIGHTS process_rights$
PRINT 'Your process rights are: '; process_rights$
20 END
RNH
Your process rights are: FAST_ACCESS,TEST_ACCESS
|
ASK SYSTEM: RIGHTS asks the operating system to return a list of the rights explicitly granted to the calling process.
9.15.13 ASK SYSTEM, SYMBOL: VALUE
ASK SYSTEM, SYMBOL str_expr: VALUE str_var
|
10 ASK SYSTEM, SYMBOL 'INTOUCH': VALUE symbol$
PRINT 'Value of symbol INTOUCH is: '; symbol$
20 END
RNH
Value of symbol INTOUCH is: $intouch_image:
|
This statement asks the operating system to translate the symbol name in str_expr and place the result into the variable specified by str_var.
9.15.14 SET SYSTEM, SYMBOL: VALUE
SET SYSTEM, SYMBOL str_expr1: VALUE str_expr2
|
10 SET SYSTEM, SYMBOL 'mysym': VALUE 'hello'
ASK SYSTEM, SYMBOL 'mysym': VALUE z$
PRINT 'Symbol set to '; z$
20 END
RNH
Symbol set to HELLO
|
This statement sets the operating system symbol name in str_expr1 to the value in str_expr2.
ASK SYSTEM: USER str_var
|
10 ASK SYSTEM : USER uname$
20 PRINT 'User is: '; uname$
30 END
RNH
User is: TESTER
|
This statement returns the operating system name or ID for the user. Under OpenVMS this is the Username.
9.16 ASK | SET WINDOW
There are various ASK WINDOW and SET WINDOW statements. These are
described in the following sections. The ASK/SET WINDOW statements ask
about and reset different screen features.
ASK WINDOW AREA row, col, row, col: DATA str_var
|
10 CLEAR
20 PRINT AT 10, 4: 'Mary had a';
PRINT AT 11, 4: 'little lamb';
30 ASK WINDOW AREA 10, 4, 11, 15: DATA x$
40 PRINT
PRINT x$
50 END
RNH
Mary had a
little lamb
Mary had a
little lamb
|
This statement reads the text displayed on the screen within the area defined by the given upper-left/lower-right coordinates into a string variable, str_var. The coordinates are specified by upper-left row, upper-left column, lower-right row, lower-right column. The statement returns a <LF> delimited string. No screen attributes are stored.
SET WINDOW AREA row, col, row, col: DATA str_expr
|
10 CLEAR
20 x$ = 'Mary had a' + chr$(10) + 'little lamb'
30 SET WINDOW AREA 6, 5, 7, 15: DATA x$
40 END
RNH
Mary had a
little lamb
|
This statement sets the screen within the area defined by the given upper-left/lower-right coordinates to the specified string. This is the mirror image of ASK WINDOW AREA row, col, row, col: DATA str_var.
ASK WINDOW: COLUMN num_var
|
10 CLEAR
PRINT AT 5,10:;
20 ASK WINDOW: COLUMN cur_col
30 PRINT 'Cursor is at column'; cur_col
40 END
RNH
Cursor is at column 10
|
This statement returns the current column of the cursor's position.
SET WINDOW: COLUMN num_expr
|
10 CLEAR
PRINT AT 5,10:;
20 SET WINDOW: COLUMN 4
30 PRINT 'Hi!'
40 END
RNH
Hi!
|
This statement positions the cursor at the num_expr column within the current row.
9.16.5 ASK | SET WINDOW: CURRENT
ASK WINDOW: CURRENT str_var
SET WINDOW: CURRENT str_var
|
10 CLEAR
PRINT AT 1,20, UNDERLINE: 'Sample screen'
20 DO
LINE INPUT 'Name', AT 5,1, LENGTH 30: name$
IF _BACK OR _EXIT THEN EXIT DO
IF _HELP THEN
ASK WINDOW: CURRENT old_w$
CLEAR AREA BOX: 1, 5, 10, 50
PRINT AT 3, 10, REVERSE: 'This is some help'
DELAY
SET WINDOW: CURRENT old_w$
REPEAT DO
END IF
30 END DO
40 END
RNH
+--------------------------------------------+
| |
| This is some help |
| |
Name| |
| |
| |
+--------------------------------------------+
Press the RETURN key to continue
|
| Previous | Next | Contents | Index |