RIGHT
 
Syntax

RIGHT( string, characters )
Description

Returns n-characters starting from the right of the string. String may be a constant or variable string.

String functions may not be nested.

A = LEFT("this is a test",5) + RIGHT(B,3)      ' valid string operation

A = RIGHT("this "+b,5)                                 ' NOT ALLOWED nested operation

Example

DIM text(20) as string
 
text = "hello world"
PRINT
RIGHT(text, 5)      'displays "world"
 

Differences from other BASICs

See also