LEFT$ function

Purpose: LEFT$ returns the leftmost substring of a string.


 Syntax:

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

 Parameters:

  • SubStr$ Returned substring from Main$.
  • MainStr$ String from which left substring is to be copied.
  • Length% Leftmost substring length.

Example:


 A$ = LEFT$("abcdefg", 4)

Result:

A$ will equal "abcd".

BCX Console Sample Programs using LEFT$ function.

S15.bas, S55.bas, S61.bas, S87.bas, S116.bas