- DFALIGN
- DFALIGNED
- DFFIELD:
- DF@
- DFLOAT+
- DFLOATS
- DF!
- D>F
- FABS
- FACOS
- FACOSH
- FALIGN
- FALIGNED
- FALOG
- FASIN
- FASINH
- FATAN
- FATANH
- FATAN2
- FCONSTANT
- FCOS
- FCOSH
- FDEPTH
- FDROP
- FDUP
- F/
- FEXP
- FEXPM1
- FE.
- FFIELD:
- F@
- FLITERAL
- FLN
- FLNP1
- FLOAT+
- FLOATS
- FLOG
- FLOOR
- FMAX
- FMIN
- F-
- FNEGATE
- FOVER
- F+
- FROT
- FROUND
- FSIN
- FSINCOS
- FSINH
- FSQRT
- FSWAP
- FS.
- F!
- FTAN
- FTANH
- FTRUNC
- F*
- F**
- FVALUE
- FVARIABLE
- F0=
- F0<
- F.
- F<
- F~
- F>D
- F>S
- PRECISION
- REPRESENT
- SET-PRECISION
- SFALIGN
- SFALIGNED
- SFFIELD:
- SF@
- SFLOAT+
- SFLOATS
- SF!
- S>F
- >FLOAT
12.6.2.1628 FVALUE f-value FLOATING EXT
( F: r -- ) ( "<spaces>name" -- ) or
( r "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below, with an initial value equal to r.
name is referred to as a "f-value".
name Execution:
( F: -- r ) or ( -- r )
Place r on the floating point stack. The value of r is that given when name was created, until the phrase "r TO name" is executed, causing a new value of r to be assigned to name.
TO name Run-time:
( F: r -- ) or ( r -- )
Assign the value r to name.
See:
Implementation:
Testing:
ContributeContributions
ruv
[436] Fix FVALUE reference implementation Suggested reference implementation2026-07-16 16:01:41
Since TO must parse the parse area, we should update the reference implementation in E.12.6.2.1628. The minimal change is as follows.
VARIABLE %var
: TO \ ( ... "\<spaces\>name" -- )
' [: 1 %var ! ;]
STATE @ IF COMPILE, COMPILE, ELSE EXECUTE EXECUTE THEN
; IMMEDIATE
: FVALUE ( F: r -- ) ( "\<spaces\>name" -- )
CREATE F,
DOES> %var @ IF F! ELSE F@ THEN
0 %var ! ;
: VALUE ( x "\<spaces\>name" -- )
CREATE ,
DOES> %var @ IF ! ELSE @ THEN
0 %var ! ;
See also a testcase for TO in contribution-360.