Add ANS structure support (#128)
[debian/pforth] / fth / floats.fth
index 8a73f7c06b6d7743295f19f0847cd5ba81b8ec86..d80738e00d2124c1cd8039e6831c51f5e83d0fdb 100644 (file)
@@ -64,7 +64,12 @@ fp-create-size swap - constant CREATE_SIZE
     fdepth 0 max  0 ?DO fdrop LOOP
 ;
 
-\ Convert between single precision and floating point
+\ Floating point structure member.
+: FFIELD:   ( n1 "name" -- n2 ; addr1 -- addr2 )
+    FALIGNED 1 FLOATS +FIELD
+;
+
+\ Convert between single precision integer and floating point
 : S>F ( s -- ) ( F: -- r )
     s>d d>f
 ;