RIGHT$ function

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


 Syntax:

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

 Parameters:

  • SubStr$ Rightmost Length% of String$.
  • MainStr$ String from which rightmost substring is to be copied.
  • Length% Rightmost substring length.

Example:


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

Result:

SubStr$ will equal "fg".

BCX Console Sample Programs using RIGHT$ function.

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