RIGHT$()
Jump to navigation
Jump to search
Description
- Returns the specified number of characters starting from the right side of a string.
Syntax
- right$(string, number)
Hints
- If number is 0, an empty string ("") is returned.
- If number is the length of the string or greater, the full string will be returned.
Example
' Check birthday to qualify
input "Enter birthday as mm/dd/yyyy: "; b$
year = val(right$(b$, 4))
if year < 1970 then
print "Sorry. Too old."
print "Perhaps checkers would be nice?"
else
print "OK. You're in."
print "Pick up some equipment and meet us on the field."
end if
end
Useful Procedures
' Place a useful function or sub using this keyword here