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


UNSIGNED Search:

In Built-in Variables in TurboForth Kernal

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

Used to determine if numbers shall be converted to signed or unsigned strings by the word N>S.

Example:

TRUE UNSIGNED !
-1 N>S TYPE CR

(displays 65535)

FALSE UNSIGNED !
-1 N>S TYPE CR

(displays -1)

Comment:

When executed, returns the address of the UNSIGNED variable so that it can be accessed as a variable with ! and @.

Internally, words such as . U. .R and U.R manipulate the UNSIGNED variable in order to force N>S (number to string) to convert the numeric value in the appropriate signed or unsigned format.

See Also: ZEROS  .  .R  N>S 

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