Diff for /gforth/struct0x.fs between versions 1.3 and 1.4

version 1.3, 2012/01/02 17:16:52 version 1.4, 2012/07/19 23:32:25
Line 17 Line 17
 \ You should have received a copy of the GNU General Public License  \ You should have received a copy of the GNU General Public License
 \ along with this program. If not, see http://www.gnu.org/licenses/.  \ along with this program. If not, see http://www.gnu.org/licenses/.
   
 : +field ( n1 n2 "name" -- n3 ) \ X:structures plus-field  : standard+field ( n1 n2 "name" -- n3 ) \ X:structures plus-field
     over if      over if
         (field) over ,          (field) over ,
     else      else
Line 25 Line 25
     then      then
     + ;      + ;
   
   Defer +field
   \ A number of things have field-like structure, but not
   \ exactly field-like behavior.  Objects, locals, etc.
   \ Allow them to plug into +field.
   
   : standard:field ( -- )
       \g set +field to standard behavior
       ['] standard+field IS +field ;
   
   standard:field
   
 : extend-structure ( n "name" -- struct-sys n ) \ Gforth  : extend-structure ( n "name" -- struct-sys n ) \ Gforth
     \g extend an existing structure      \g extend an existing structure
     >r 0 value lastxt >body r> ;      standard:field >r 0 value lastxt >body r> ;
   
 : begin-structure ( "name" -- struct-sys 0 ) \ X:structures  : begin-structure ( "name" -- struct-sys 0 ) \ X:structures
     0 extend-structure ;      0 extend-structure ;

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>