02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FORMAT$<br />

Purpose Function for formatting a number represented by a string.<br />

Syntax FORMAT$(,"b"|"d")<br />

Chapter —Program Instructions<br />

is a string of integers or ASCII characters.<br />

is the number of bytes to output in integer to ASCII conversion.<br />

FORMAT$(,)<br />

is the string of numerals, optionally with decimals, which is to be<br />

formatted.<br />

specifies the format of the string.<br />

Remarks FORMAT$ can be used for conversion of strings from ASCII to integer<br />

numbers and vice versa when used as in the first syntax above.<br />

b = Specifies conversion from integer to ASCII format.<br />

1<br />

This converts from a number in integer format to the correspon-<br />

1<br />

ding characters in ASCII format. specifies the number of bytes to<br />

1<br />

output. For example FORMAT$("1380337988","4b") yields RFID.<br />

d = Specifies conversion from ASCII format to integer.<br />

The string is translated from an ASCII string to the same number<br />

1<br />

in integer format. For example, FORMAT$("A","d") yields 65.<br />

FORMAT$ is also be used to convert a number to a specific display<br />

format. The original string () is a string of digits, optionally with<br />

1<br />

a decimal point to separate decimals from integers. It can also contain<br />

leading plus (+), minus (-), and space characters. Space characters are ignored,<br />

whereas the usual mathematical rules apply to plus and minus signs.<br />

All other characters (or plus, minus, and space characters in other positions<br />

than leading) generate errors. The format is specified by a string (). 2<br />

The string can contain any characters, but some have special meanings.<br />

Note the explanation of the following characters.<br />

0 = Digit place holder, display a digit or zero.<br />

If the input number has fewer digits than there are zeros (on either side of<br />

the decimal separator) in the format string, leading or trailing zeros are displayed.<br />

If the number has more digits to the left side of the decimal separator<br />

than there are zeros to the left side of the separator in the format string<br />

the digits will be displayed. If the number has more digits to the right of<br />

the separator than there are zeros to the right of the decimal separator in<br />

the format string, the decimal will be truncated to as many decimal places<br />

as there are zeros.<br />

# = Digit placeholder, display a digit or nothing.<br />

If there is a digit in the expression being formatted in the position where<br />

the # appears in the format string, display the digit or otherwise display<br />

nothing in that position. If the number has more digits to the left side of<br />

<strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong> 101

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!