Functions |
MID$
The MID$(X$,1. [,J]) function examines string X$ and returns the rightmost characters starting at pointer 1. I and J are integers in the range
MID$(string expression, expression [,expression])
10X$ = "JOHN J. JONES"
20PRINT MID$(X$,10,3)
30PRINT MID$(X$,9)
40END
RUN ONE JONES
Ok
The MID$ (X$, 1. [,J]) function may also appear on the left side of an assignment statement. Employed in this context, it will replace the characters of string X$ begin- ning at position I with the string given on the right. If J is specified, J characters of X$ are replaced. If I is greater then LEN(X$) , an illegal function call error is displayed. The length of X$ is never changed.
10A$ = "ABCDEF"
20B$ = "XXYYZZ"
30MID$(A$,2,4) = B$
40PRINT A$
50END
RUN AXXYYF
Ok
MKI$
MKS$
MKD$
The three functions MKI$, MKS$, and MKD$ convert data represented as numerical values into
MKI$ (integer)
MKS$
MKD$
These functions are used to place numeric values into fields of random file buffers. See Chapter 5 for discussion of MKI$, MKD$, and MKS$
OCT$
The aCTS function returns a string of octal digits which represent the value of the integer argument. The expression is rounded to an integer before conversion.
OCT$ (expression)
10PRINT "TYPE DECIMAL INTEGER TO BE CONVERTED."
20INPUT A
30A$ = OCT$(A)
40PRINT A,"EQUALS,"A$," IN OCTAL."