DIC.Format_Numeric

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > String commands > !DIC.-Delimited Item Commands >

DIC.Format_Numeric

MiniRobotLanguage (MRL)

 

DIC.Format_Numeric

Format delimited Fields in a Line in the same way like with FMT.

 

 

Intention

 

Assume you a line containing some Floating-Point Numbers. Now if you convert them to TAB-separated Text, they may be badly formatted if they do not have an equal length.

Use this Command to format specified Numeric Data in a line.

 

 

VAR.$$LIN=2022/07/19$tab$03:44:06$tab$-32.4$tab$-12.0$tab$-12.0$tab$-17.7$tab$36.7$tab$377

VAR.$$DEL=$tab$

VAR.$$IND=4,5,6,7

' For more Options see FMT.-Command

VAR.$$FMT=00.00

 

' Now we call the command

DIC.Format_Numeric|$$LIN|$$DEL|$$IND|$$FMT|$$RES

 

' And Debug-Print the Result 27

DBP.$$LIN$crlf$$$RES

 

ENR.

 

Result:

clip0385

 

 

Syntax

 

DIC.fnu|P1|P2|P3|P4[|P5][|P6]

DIC.Format_Numeric|P1|P2|P3|P4[|P5][|P6]

 

 

Parameter Explanation

 

P1 - Field Index can be a number like 1,2,3 (makes no sense anyway) or a Letter like "A", "AB". Letters must be enclosed in " ".

P2 - (optional) Variable for Result. If omitted result is placed on TOS.

 

 

 

Example

 

'***********************************

'

'***********************************

 

 

 

Remarks

-

 

Limitations:

-

 

 

 

See also:

 

1.5.2 Working with Text-Strings

VAR. - Variable Set Value/Clear

IVS. / NVS. - If-Variable-String

GSS. - GetSplitString

SRT. - Sort Items

! STR. - String Command

GES. - Get-Extracted-String

SBD. - String between Delimiter

SBM. - String between Delimiter-Multiple

FEM. - For Each Member

LEN. - Length-of-String

DIC.-Delimited Item Commands

DIC.Eval_Column_List

DIC.Get_Field_Index

DIC.Get_Fields

DIC.Get_in_Order

DIC.Insert

DIC.Letter_to_Number

DIC.Number_to_Letter

DIC.Remove

DIC.Set_Multiple

DIC.Set_Value

DIC.Swap