
7-6
Section
Details of BASIC Commands
218
save
Syntax:
SAVE
# <port expression> [,“TERM:[<communication definition string expression>]”]
Description:
Command. Writes the BASIC program in the current program area to a communication port.
<port expression> is an expression returning an integer in the range: [1… 3].
See the
OPEN
statement for a description of the <communication definition string expression>.
The communications conditions specified by the
SAVE
command’s <communication definition
string expression> are valid while the
SAVE
command is being executed. The original conditions
are valid again after execution of the
SAVE
command is completed.
Remarks:
Note:
1.
The procedure for reading a program stored in the ASCII Unit to a terminal depends
on whether the terminal mode of the connected port is VT-100 or FIT-10. In either
case, input from the terminal is disabled during the transfer.
Refer to 7-1 Programming Procedure for details on saving BASIC programs.
2.
Port #3 corresponds to the terminal port of the ASC31.
3.
If Port #3 is specified on the ASC11 or ASC21 an “ILLEGAL FUNCTION CALL”
error (code B005) will result.
Examples:
> SAVE #1, “TERM:9600,8,N,2,CS_OFF,RS_OFF,DS_OFF,XN_ON”
See also:
LOAD
search
Syntax:
SEARCH
(<integer array>, <numerical expression 1> [, <numerical expression 2>]
[, <numerical expression 3>])
Description:
Function. Searches an specified array variable (one-dimensional array variables only) for the
occurrence of a specified value and returns the index of the first occurrence of that value.
Remarks:
<integer array> is a one-dimensional array of integers to be searched.
<numerical expression 1> is the expression to be searched for in the array. If this is not an integer
it is first rounded.
<numerical expression 2> this optional expression gives the starting index of the search in the
array. If omitted the starting index is assumed to be the first element in the array. If
OPTION BASE
has been executed specifying that the first index is 1 and this expression is 0 then the search will
start from the first element in the array, index 1.
<numerical expression 3> this optional integer expression gives the search increment. For
instance a value of 2 would suggest that every second element in the array is searched. If omitted
a value of 1 is assumed.
If an occurrence of the search string is not found then -1 is returned.
Examples:
> 10 DIM ARRINT%(100)
> 20 FOR I = 1 TO 100
> 30 ARRINT%(I) = I MOD 10
> 40 NEXT I
> 50 A = SEARCH(ARRINT%, 7, 12, 1)
> 60 PRINT “7 IS FIRST FOUND AT POSITION “; A
> RUN
7 IS FIRST FOUND AT POSITION 17
See also:
Summary of Contents for C200H-ASC11
Page 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Page 2: ...iv...
Page 4: ...vi...