Sharp OZ-707 Operation Manual - Page 27

File Numbers, Data Files, Expressions, Numeric Operators, String Expressions

Page 27 highlights

Note: Device name PACOM refers to the IC card (Scientific Computer Card I BASIC I or Program Card I BASIC D installed in another Organizer to or from which a program or data is transferred. The optional CE-200L Data Transfer Cable is required to connect the two Organizers for data transfer. The complete file descriptor thus consists of the device name, filename, and extension: d: filename.ext File Numbers File numbers are used with certain commands (e.g., OPEN, INPUT# and PRINT#) to read data from or write data to files. File numbers can be specified with #1 - #255. A maximum of two files on any two devices may be opened at the same time. The following device combinations are possible: ~ E PACOM CAS COM E 0 0 0 0 0: may be opened at the same time. PACOM 0 x x 0 x: may not be opened at the same time. CAS 0 x x 0 COM 0 0 0 x All files are closed before executing the LOAD or MERGE command. Data Files There are two types of data file; sequential data files and random access data files. The Card supports sequential data files only. Data is written to a sequential file as a series of ASCII characters stored one item after another (sequentially) in the order sent. The data is read back sequentially when later accessed. 42 Expressions An expression is some combination of variables, constants, and operators that can be evaluated to a single value. The calculations that you entered previously were examples of expressions. Expressions are an intrinsic part of BASIC programs. For example, an expression might be a formula that computes an answer to some equation, a test to determine the relationship between two quantities, or a means to format a set of strings. Numeric Operators The Card has five numeric operators. + Addition *- Subtraction Multiplication / Division 1\ Power A numeric expression is constructed in the same way that you entered compound calculations. Numeric expressions can contain any meaningful combination of numeric constants, numeric variables, and the numeric operators: *(A B) 1\ 2 * A(2,3) + A(3,4) + 5.0 - C (AlB) (C + D) String Expressions String expressions are similar to numeric expressions except that there is only one string operator - concatenation (+). This is the same symbol used for addition. When used with a pair of strings, the + attaches the second string to the end of the first string and makes one longer string. You should take care in making more complex string concatenations and other string operations because the work space available for string calculations is limited to 254 characters. 43

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128

Note:
Device name PACOM refers to the IC card (Scientific Computer Card
I
BASIC
I
or Program Card
I
BASIC
D
installed
in
another Organizer to or
from which a program
or
data is transferred. The optional CE-200L
Data Transfer Cable is required to connect the two Organizers for data
transfer.
The
complete file descriptor thus consists of the device name,
filename, and extension:
d: filename. ext
File Numbers
File numbers are used with certain commands (e.g., OPEN, INPUT#
and PRINT#) to read data from or write data to files.
File numbers can be specified with
#1
- #255.
A maximum of two files on any two devices may be opened at the
same
time. The following device combinations are possible:
~
E
PACOM
CAS
COM
E
0
0
0
0
0:
may be opened at the same time.
PACOM
0
x
x
0
x: may not
be
opened at the same time.
CAS
0
x
x
0
COM
0
0
0
x
All files are closed before executing the LOAD or MERGE command.
Data Files
There are two types of data file; sequential data files and random
access data files. The Card supports sequential data files only. Data is
written to a sequential file as a series of ASCII characters stored one
item after another (sequentially) in the order sent. The data is read
back sequentially when later accessed.
42
Expressions
An expression is some combination of variables, constants, and
operators that can be evaluated to a single value. The calculations that
you entered previously were examples of expressions. Expressions are
an intrinsic part of BASIC programs. For example,
an
expression might
be a formula that computes an answer to some equation, a test to
determine the relationship between two quantities, or a means to
format a set of strings.
Numeric Operators
The Card has five numeric operators.
+
Addition
-
Subtraction
*
Multiplication
/
Division
1\
Power
A numeric expression is constructed in the same way that you entered
compound calculations. Numeric expressions can contain any
meaningful combination of numeric constants, numeric variables, and
the numeric operators:
(A
*
B)
1\
2
A(2,3)
+
A(3,4)
+
5.0 -
C
(AlB)
*
(C
+
D)
String Expressions
String expressions are similar to numeric expressions except that there
is only one string operator -
concatenation
(+).
This is the same
symbol used for addition. When used with a pair of strings, the
+
attaches the second string to the end of the first string and makes one
longer string. You should take care
in
making more complex string
concatenations and other string operations because the work space
available for string calculations is limited to 254 characters.
43