Formatsizefordisplay(); Getdecimalseparator(); Getfirstmatch() - IBM Prerequisite Scanner User Manual

Table of Contents

Advertisement

Return values
String vartoString

formatSizeForDisplay()

Takes the input parameter and appends or trims the fractional part of the input
parameter to two decimal points, for example, 123MB to 123.00MB or 12.123MBs to
12.12MBs.
Purpose
This function counts the number of characters in the input parameter, checks
whether it's a number or string, and splits the input parameter into the whole and
fractional parts. Depending upon the fractional part, it appends or trims it to two
decimal places. It returns the result.
Syntax
formatSizeForDisplay(size)
Input parameters
Integer size
Return values
Integer val

getDecimalSeparator()

Determines the decimal separator that is used for the current locale.
Purpose
This function creates a fractional number and then uses the Mid() function to
determine the decimal separator that is used in that fractional number.
Syntax
getDecimalSeparator()
Input parameters
None
Return values
Character sep

getFirstMatch()

Gets the first match of the search string in the array.
Returns the result of the called "formatSizeForDisplay()" function.
The value to round to two decimal points.
Returns the value rounded to two decimal points.
Returns the decimal separator, for example , or . for locale.
Appendix E. Common functions for Windows systems
121

Advertisement

Table of Contents
loading

Table of Contents