Working with non-Integer Values

Defining the algorithm for non-integer values must be done differently depending on you whether you are speaking a currency amount or some other numeric value such as a scientific result. For example:

String: | 10.5 |

Currency: | ten dollars and fifty cents |

Currency: | ten dinars and five hundred millemes |

Value: | ten point five |

Given a non-integer input value such as 10.5 the integer block value will contain 10 and the decimal block value will contain 50 if DECIMALS is 2 (the default), 5 if DECIMALS is 1, 500 if decimals is 3, etc. This is designed for easy coding of an algorithm for speaking currency values as in these examples.

To speak non-currency decimal values, do not use a decimal block. Use a cut block with values 0 and 1 followed by a string block, as in the sample file FFVALUE.ALG. For an input of 10.5 the string block will receive "5" which will allow you to speak point five, and for 10.05 the string block will receive "05" to speak point zero five. If you were to increase the end value of the cut block to 3, the 10.05 input value would produce the string block "050" to speak point zero five zero.