|
GoFiler Legato Script Reference
Legato v 1.5d
Application v 5.25a
|
Chapter
Five — General Functions
(continued)
5.6 Numeric String
Processing
5.6.1 Overview
Legato provides a wide variety of functions to aid in handling various types and formats of numbers and numbering
styles. These including accounting, currency, hexadecimal, as well as other types of numeric data. This section covers those functions.
In addition, functions such as the FormatString function can be used for numeric conversion.
Accounting formatting includes processing commas and currency such as adding and removing commas, e.g. “1000”
versus “1,000”. Note that Legato principally supports US currency conventions.
Hexadecimal processing is provided for basic conversion and for array conversion or blocks of data. The
output functions are substantially more flexible than the FormatString
function.
Cardinal number processing allows for conversion of integers to and from textual presentations,
for example, “eleven thousand” to 11,000 and vice-versa. Additional string processing can be performed to change
the case and formatting of the numbers
Letter counting is also provided to convert simple or complex numbers such as ‘A’ for 0
and ‘AA’ for 26. This also includes “cell addressing” for spreadsheets such as “B17”, the second column
on the 17th row.
Finally, there are functions to express approximate numbers, such as 34,567 as 34kb.
5.6.2 Functions
Accounting:
DecimalToFloat — Converts to a floating-point number (64-bit).
FloatToString — Converts a floating point to a string
with optional decimal places.
FormatNumber — Converts a value into a formatted
number.
FormatNumberWithComma — Converts a flat string of numbers to US formatted numbers.
FormattedMoneyToNumber — Converts a monetary value to a plain integer or real number in string format.
GetNumericDecimalPortion — Returns the decimal number portion of a numeric string.
GetNumericWholePortion — Returns the whole number portion of a numeric string.
MoneyRemoveTrailingZeros — Removes trailing zeros and decimal point as required.
Cell Addressing:
CellAddressGetColumn — Converts a cell address to index and returns the zero-based column value.
CellAddressGetRow — Converts a cell address to index and returns the zero-based row value.
CellAddressToIndex — Converts a cell address to index and returns row/column values as array.
CellIndexToAddress — Converts a zero-based row and column index to cell address.
Computer Oriented:
HexBufferToBlock — Converts a variable to a multiple line formatted string as a hex array with optional size, flags and base information.
HexBufferToByteString — Converts a variable to a string hex array with optional size, flags and base information and padding.
HexBufferToString — Converts a variable to a string hex array with optional break position and size with padding.
HexToBuffer — Converts a string of hex characters into a variable or array and returns the number of bytes.
HexToInteger — Converts a hex string to a 64-bit integer or quad word.
IntegerToBinaryCombo — Performs conversion to unit values but adds in total bytes as required.
IntegerToBinaryUnits — Performs conversion to unit values .
OctalToInteger — Converts an octal number to an integer.
General:
TextToInteger — Converts any integer-style to a number including hex and octal.
Lettering:
AlphaToInteger — Converts AA style numbering to integer. Zero-inclusive values, A 0, B 1, AA 26, AB 27, etc.
IntegerToAlpha — Converts a numeric value to an alpha value. Zero-inclusive values, A 0, B 1, AA 26, AB 27, etc.
IntegerToOrdinal — Converts integer to ordinal-style numbering. First, Eleventh, One Hundred Eighth, etc.
IntegerToRoman — Converts an integer to a roman number.
RomanToInteger — Converts a clean roman number to an integer.
Plain Language:
CardinalToInteger — Converts a cardinal-style number to integer. For example: One 1, Eleven 11, 27, etc.
DecimalToInteger — Converts a decimal value to integer. It cannot contain commas or periods
IntegerToCardinal — Converts an integer to cardinal-style numbering. For example: 1 One, 11 Eleven, etc.
Page revised 2024-12-13
© 2012-2024 Novaworks, LLC. All rights reserved
worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and
11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC.
EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated
with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective
owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software
License Agreement.