RIGHT$ function

Purpose: RIGHT$ returns the right substring of a string.


 Syntax:

 SubStr$ = RIGHT$(MainStr$, Length%)

 Parameters:

  • MainStr$ string from which the rightmost substring is to be copied.
  • Length% rightmost substring length.

 Return Value:

  • SubStr$, the return value, is the rightmost substring of MainStr$.

Example:


 DIM SubStr$
  
 SubStr$ = RIGHT$("abcdefg", 2)
 
 PRINT SubStr$

Result:

fg

BCX Console Sample Programs using RIGHT$ function.

S01.bas   S21.bas   S55.bas   S110.bas