LEFT$()

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Not supported in Run BASIC

Description

Returns the specified number of characters starting from the left side of a string.
See also RIGHT$() and MID$().

Syntax

  1. left$(string, number)

Hints

  1. If number is zero or less, an empty string ("") is returned.
  2. If number is the length of the string or greater, the full string will be returned.

Example

' Assign refernce name
    print "Your request has been received."
    print
    input "Please enter your last name: "; name$
    input "Please enter your age: "; age$
    print
    print "Thank you. Your file reference name will be: "; left$(name$, 5)+age$
    print
    print "Please use that name in future correspondence."
    ' Code continues

    end

Useful Procedures

' Place a useful function or sub using this keyword here