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


D.R Search:

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

Word Name: D.R
Type: Standard word
Data Stack Signature: d:x s:width –
Return Stack Signature: --
Availability: V1.2
Description:

Displays a signed double-precision value right justified to 'width' characters.

Example:

-123. 6 D.R (displays **-123 where each * represents a space character)
 

Comment:

The number is padded on the left with space characters.

If the number to be displayed is too large to fit within the specified width, then 'width-1' characters of the number are displayed, with a leading # symbol to indicate that characters are missing from the displayed number. Thus, where a width is too small, the displayed value still fits within the field length (to preserve screen layout in applications) and a visible warning (in the form of the # symbol) is given to warn the user that digits remain hidden. This approach is borrowed from spreadsheet
applications where a leading # indicates insufficient field width. If the specified field width is <=0 then it is replaced with 1.

See Also: .R  U.R  U.  UD. 

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