EasyManua.ls Logo

Husky Hunter - Page 251

Husky Hunter
499 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BASIC FUNCTIONS
SECTION 5. 14
MID$
5.14.2 Function MID$ returns a substring of given length starting at the
given position. It may also be used as a statement.
Syntax
B$=MID$ (A$,X,[Y])
or
MID$ (A$,X, [Y]) = C$
Examples 10 A$= "ABCDEFGH"
20 PRil'IT MID$ (A$,3,4)
Prints CDEF
Remarks A$,X or Y may be expressions. If Y is omitted then all
characters to the right of the Xth character are returned.
In the above example:
VER.V09F
MID$ (A$, O, 3) = 'ABC'
MID$ (A$,20,5)
= null string
MID$ (A$,
7) =
1
GH'
When MID$ is used as a statement in the form:
MID$(A$ ,X [, Y] )=C$
its sets the part of A$ starting at the Xth character with
the substring C~ The optional parameter Y denotes the
length of the part of A$ to be replaced and if owitted
defaults to the length of C$.
PAGE 5 - 82