Sharp OZ-707 Operation Manual - Page 95

Merge

Page 95 highlights

MERGE 0 FORMAT: MERGE "[d:} filename" IENTER I d: E,PACOM,CAS,COM Abbreviation: MER. See Also: LOAD, CHAIN PURPOSE: . . Loads a program file from the specified device and merges it with a program in memory. REMARKS: ., d MERGE retains the program in memory and then loads the specifle program. VE The program file to be merged must have ASCII format (see the SA command). Note: When a program in intermediate format is loaded, an abnormal condition may occur. If the line numbers overlap, the lines of the specified file replace the lines of the program in memory. . ' If the device name is omitted, the device name used In the last file command is assumed. For example, if the last file command is FILES"E:", RAM disk E is assumed as the device name. An error occurs if the program overflows the program area as a result of a MERGE command. Clear unnecessary variables, then try MERGE again. EXAMPLE: Program in memory 10: INPUT A, B 15: PRINT A, B * * 20: C .. SOR (A A + B B) 25: PRINT C 30: END Program to be merged (ASCII format) 10: INPUT A, B, C 20: S .. (A + B + C)/2 * * 30: AREA .. SOR (S (S - A) (S - B) * (S - C)) 40: PRINT AREA 50: END Program after merge 10: INPUT A, B, C 15: PRINJ A, B 20: 5 = (A + B + C)/2 25: PRINT C * * * 30: AREA = SOR (5 (S - A) (5 - B) (S - C)) 40: PRINT AREA 50: END The contents of lines 10, 20, and 30 are replaced with those of the same lines of the loaded program. MID$ p o FORMAT: MID$(string,N,M) Abbreviation: M. See Also: LEFT$, RIGHT$ PURPOSE: Returns a string of M characters from inside a string starting from the Nth character in the string. REMARKS: If N is greater than the number of characters in the string, a null string is returned. If N is less than 1, an error occurs. M must be in the range of 0 to 254 and N in the range of 1 to 254. Fractions will be truncated. 178 179

  • 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

MERGE
0
FORMAT:
MERGE "[d:} filename"
I
ENTER
I
d:
E,PACOM,CAS,COM
Abbreviation:
MER.
See
Also:
LOAD, CHAIN
PURPOSE:
.
.
Loads a program file from the specified device and merges
it
with a
program in memory.
REMARKS:
.,
d
MERGE retains the program in memory and then loads the specifle
program.
VE
The program file to be merged must have ASCII format (see the SA
command).
Note:
When a program
in
intermediate format is loaded,
an
abnormal
condition may occur.
If the line numbers overlap, the lines of the specified file replace the
lines of the program in memory.
.
'
If the device name is omitted, the device name used
In
the last file
command is assumed. For example, if the last file command is
FILES"E:",
RAM
disk E is assumed
as
the device name.
An
error occurs if the program overflows the program area as a result
of a MERGE command. Clear unnecessary variables, then try MERGE
again.
178
EXAMPLE:
Program
in
memory
10: INPUT
A,
B
Program to be merged (ASCII format)
10: INPUT
A,
B,
C
15: PRINT
A,
B
20: S ..
(A
+
B
+
C)/2
20: C .. SOR (A
*
A
+
B
*
B)
25: PRINT C
30: AREA .. SOR (S
*
(S
-
A)
*
(S
-
B)
*
(S
-
C))
30:
END
40: PRINT AREA
50:
END
Program after merge
1
0: INPUT
A,
B,
C
15: PRINJ
A,
B
20:
5
=
(A
+
B
+
C)/2
25: PRINT C
30: AREA
=
SOR
(5
*
(S
-
A)
*
(5 -
B)
*
(S
- C))
40: PRINT AREA
50:
END
The contents
of
lines 1
0,
20,
and 30 are replaced with those of the same lines
of the loaded program.
MID$
FORMAT:
MID$(string,N,M)
Abbreviation:
M.
See
Also:
LEFT$, RIGHT$
PURPOSE:
Returns a string of M characters from inside a string starting from the
Nth character in the string.
REMARKS:
p
o
If
N is greater than the number of characters
in
the string, a null string
is
returned. If N is less than
1,
an error occurs. M must
be
in
the range
of 0 to 254 and N in the range of 1 to 254. Fractions will
be
truncated.
179