
PT-Basic Programming Manual Ver. 1.00 24/143
To retrieve a given number of characters from the left side of
the target string.
Str$ = "ABCDEFGHIJK"
PRINT LEFT$(Str$,3)
PRINT LEFT$("168IbB",3)
A$ is a string variable to be assigned to the result.
Str$ may be a string variable, string expression, or string
constant.
N% is a numeric expression.
If N% is larger than the length of Str$,the Str$ is returned.
If N% is zero, the null string is returned.
To retrieve a given number of characters from anywhere of
the target string.
A$ = MID$( Str$, N%[, M%])
Str$ = "ABCDEFGHIJK"
PRINT MID$(Str$,5,3)
PRINT MID$("123& #168IbB",6,5)
A$ is a string variable to be assigned to the result.
Str$ may be a string variable, string expression, or string
constant.
N% and M% are numeric expression.
This command returns a string of length M% characters from
Str$ beginning with the N%th character.
If M% is equal to zero, or if N% is greater than the length of
Str$, then it returns a null string.
Comentários a estes Manuais