<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


<# Search:

In Double-Precision Numeric Display Words in 32-bit library

Word Name: <#
Type: Standard word
Data Stack Signature: --
Return Stack Signature: --
Availability: V1.2
Description:

Begins Pictured Numeric Output (PNO) conversion.

Example:

12345678. <#

At this point, the double value 12,345,678 is on the stack, and the PNO buffers and pointers etc. are initialised to commence PNO conversion. The actual conversion is performed using the words # and #S.

Comment:

PNO is a method of formatting numbers for display on the screen, using # symbols to represent digits. PNO actually converts the number to be displayed to a string, allowing the opportunity to insert characters into the character stream as conversion progresses (for example, commas, to separate hundreds and thousands, etc.).

<# begins the PNO conversion process, it initialises the PNO buffer (referred to as _PNOB in the code), the PNO buffer pointer (_PNOBP) and the PNO length indicator (_PNOLEN). Therefore, if importing the PNO words into your own system you must observe the above dependencies.

_PNOB _PNOBP and _PNOLEN are declared as follows:

CREATE _PNOB 34 CHARS ALLOT \ pno buffer
0 VALUE _PNOLEN \ pno length
_PNOB 33 + VALUE _PNOBP \ pno current position pointer

To begin PNO conversion, an unsigned-double value must be on the stack (note, however, that <# does not affect the value on the stack, hence its stack signature is empty).

See Also: None listed

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>