LZero function
Prototype: |
function LZero(const Value :variant; const Len :integer) :string |
|
Description: |
The LZero function returns string of a Len length with leading zeros. |
|
Syntax: |
variable:= LZero(Value,Len); |
|
Part |
Description |
|
variable |
Variable declared as string |
|
Value |
Variable declared as variant that represents the value to be completed |
|
Len |
The total length of the final output |
|
Return value: |
Returns string of a Len length with leading zeros. |
|
Example:
var
OrderID:integer;
Order,Invoice:string;
Begin
OrderID:=123;
Order:=LZero(OrderID,6);
Invoice:=DateToStr(Date)+'/' + Order;
showMessage(format('Invoice: %s',[Invoice]));
end.
See also:
Format; LZero; Delete; Trim; TrimLeft; TrimRight; SameText; StringReplace; DeFormat1-10; GetFieldCountFromString;GetFieldFromString; IndexOfField; SortNumericSequence
© 2024 IFER-Monitoring and Mapping Solutions