MC-Basic:LEFT$

From SoftMC-Wiki
Revision as of 16:00, 13 December 2010 by Arwiebe (talk | contribs) (Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= LEFT$(''<string>, <expression>'') |AVAILABILITY= All versions |DESCRIPTION= The LEFT$ returns the specified number of characters from the lef…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The LEFT$ returns the specified number of characters from the left-hand side of the string.

In UTF-8 supporting versions 4.5.1 and higher NULL characters are no longer cut

out from strings, resulting in a different behavior:

Len of Chr$(0) is 1:

In former versions NULL characters could not appear in the middle of strings,

since theconcationation process cut these characters from the resulting string.

Syntax

LEFT$(<string>, <expression>)

Availability

All versions

Type

<return value>: String
<string>: String
<expression>: Long

Range

<return value>: String
<string>: String
<expression>: 0 to MaxLong

Scope

Configuration, Task or Terminal

Limitations

Read-Only

Examples

-->Test=”This string is to long”

-->PRINT LEFT$(Test,4)
                   This

See Also