LeftAlign

The LeftAlign built-in variable method removes leading zeros from the numeric expression and moves the result, left-aligned, and without separators, to the calling variable. Trailing decimal zeros are not removed. If the calling variable is not sufficiently long, the value is truncated on the right.

Moving non-zero values

If the value of the alignThis parameter is non-zero:

Syntax

<<string variable>>::LeftAlign(
   alignThis : numericExpression,
   setZero : boolean = false,
   decimalChar : string = void ) : void

Owner

Any string variable.

Parameters

Example

In this example, use of the following LeftAlign method invocations, with differing parameter lists result in different AlphOut variable values, as listed in the following table.

AlphOut.LeftAlign(NumIn)
Alphout.LeftAlign(NumIn, true)
Alphout.LeftAlign(NumIn,false,",")
Alphout.LeftAlign(NumIn, true, ",")       

Each blank in the AlphOut value is denoted by an asterisk ('*').

NumIn

NumIn Decimals

AlphOut

NumIn

NumIn, true

NumIn, false,","

NumIn, true, ","

724

None

724******

724******

724******

724******

-724

None

-724*****

-724*****

-724*****

-724*****

123.45

2

123.45***

123.45***

123,45***

123,45***

123.45

4

123.4500*

123.4500*

123,4500*

123,4500*

-123.45

3

-123.450*

-123.450*

-123,450*

-123,450*

-123.45

6

-123.4500

-123.4500

-123,4500

-123,4500

-12345.6789

4

-12345.67

-12345.67

-12345,67

-12345,67

0.12

2

.12*****

.12*****

,12*****

,12*****

-0.12

3

-.120***

-.120***

-,120***

-,120***

0

None

*********

0********

*********

0********

0

1

*********

.0*******

*********

,0*******

0

2

*********

.00******

*********

,00******

0

4

*********

.0000****

*********

,0000****

0

8 or more

*********

.00000000

*********

,00000000