![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

I load an oop enhancement package on startup, which contains this:
OOP OPEN-PACKAGE
PUBLIC
GET-CURRENT CC-WORDS SET-CURRENT
: FLOAT ( -- ) THIS SIZEOF ALIGNED THIS >SIZE !
[ +CC ] 8 BUFFER: [ -CC ] ;
\ ... other package words, including values of various sizes
END-PACKAGE
This works in an object just like fvariable, but is easier to read
than 8 buffer: and easier to change size if you ever need to. You can
call FLOAT FVARIABLE if you wish.
Use:
CLASS TEST
FLOAT X
FLOAT Y
: XY ( -- FL: -- X Y ) X F@ Y F@ ;
END-CLASS
Glenn
*********************************
Get your free E-Mail and Homepage
Go to http://www.networld.com
*********************************
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Fri Sep 19 2003 - 09:38:23 PDT
This archive was generated by hypermail 2.2.0 : Wed Jan 07 2009 - 03:04:10 PST