<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In Programming and Stack Management Words in 32-bit library
2@ returns a double-precision value previously stored in a double-precision variable with 2!.
1234567. AMOUNT 2!
AMOUNT 2@ D. (displays 1234567)
The above example declares a double-precision variable called AMOUNT. The value 1,234,567 is then stored in the variable with 2!. Finally, the value is retrieved from the variable using 2@ and displayed with D..
As can be seen (and as indicated by the stack signature) AMOUNT returns its address (see 2VARIABLE) which is used by 2@ to return the actual double value stored at that address.
Pronounced “2 fetch” or “double-fetch”.