NAME

right$ - return the rightmost part of a string

SYNOPSIS

v$ = right$(StrExpr, NumExpr)

DESCRIPTION

Right$ returns a string consisting of the rightmost NumExpr characters of the string specified by StrExpr.  StrExpr may be any string expression.  NumExpr may be any numeric expression.  If the value of NumExpr is greater than or equal to the length of the string specified by StrExpr, then StrExpr is returned.  If NumExpr is zero, the null string (the string of length zero) is returned. 

EXAMPLE

The program
	a$ = "CLEVELAND, OHIO"
	print right$(a$, 4)
produces
	OHIO

SEE ALSO

mid$(func), left$

DIAGNOSTICS

An "Illegal function call" error occurs if NumExpr is less than 0. 

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber