7Ć6
7.16 RIGHT$ Function
Format:
RIGHT$(string,str_length)
where:
string can be a string variable or expression.
str_length is the number of characters to take from the right side
of the string (expression) in parameter 1.
The function returns a substring that is equal to
`strĆlength'(parameter 2) of the rightĆmost characters of the string or
string expression (parameter 1):
SUB_STRING$ = RIGHT$(`ABCDEFG',4)
##"has the value DEFG)
STR1$ = '12345'
SUB_STRINGS$ = RIGHT$(STR1$ + 'ABC',6)
"
7.17 MID$ Function
Format:
MID$(string, start, end)
where:
string can be a string variable or expression.
start is the starting character position of the substring.
end is the ending character position of the substring.
The function returns a substring from within another string. The
three parameters are, respectively, the string to operate on, the
starting character position, and the ending character position. The
substring is then taken from those two inclusive positions:
SUB_STRING$ = MID$(`ABCDEFG',2,3) _
##!
STRING$ = BIGLONGSTRING"
SUB_STRING$ = MID$(STRING$,3,7)
##"!
7.18 VAL% Function
Format:
VAL%(string)
where:
string can be a string variable or expression.
The function returns the integer value of a string in an integer format.
If the string is not in an integer format, the returned value will be zero
and an error is logged:
STR_V
AL% = V
AL%(`123' + `74')
""""""""""
Comentarios a estos manuales