From: George H. <geo...@us...> - 2011-04-20 11:37:32
|
Update of /cvsroot/win32forth/win32forth/src/kernel In directory vz-cvs-4.sog:/tmp/cvs-serv16084 Modified Files: fkernel.f Log Message: Altered comments to use "name" -- rather than -<name>- Index: fkernel.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/kernel/fkernel.f,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** fkernel.f 19 Apr 2011 20:30:04 -0000 1.70 --- fkernel.f 20 Apr 2011 11:37:29 -0000 1.71 *************** *** 3317,3321 **** in-system ! : [COMPILE] ( -<name>- ) \ compile the xt of word <name> ' COMPILE, ; IMMEDIATE --- 3317,3321 ---- in-system ! : [COMPILE] ( "name" -- ) \ compile the xt of word <name> ' COMPILE, ; IMMEDIATE *************** *** 3324,3331 **** CHAR [COMPILE] LITERAL ; IMMEDIATE ! : ['] ( -<name>- ) \ compile xt of <name> as a literal ' [COMPILE] LITERAL ; IMMEDIATE ! : POSTPONE ( -<name>- ) \ compilation only - compile xt of word DEFINED DUP ?MISSING 0< IF COMPILE COMPILE THEN --- 3324,3331 ---- CHAR [COMPILE] LITERAL ; IMMEDIATE ! : ['] ( "name" -- ) \ compile xt of <name> as a literal ' [COMPILE] LITERAL ; IMMEDIATE ! : POSTPONE ( "name" -- ) \ compilation only - compile xt of word DEFINED DUP ?MISSING 0< IF COMPILE COMPILE THEN *************** *** 3734,3742 **** ; ! : proc ( #params -<name>- ) \ #arguments proc MessageBeep bl word count #"proc drop ; ! : extern ( -<name>- ) \ extern var 0x20 proc ; --- 3734,3742 ---- ; ! : proc ( #params "name" -- ) \ #arguments proc MessageBeep bl word count #"proc drop ; ! : extern ( "name" -- ) \ extern var 0x20 proc ; *************** *** 4423,4432 **** : SLOW ( -- ) slfactor ms start/stop ; \ set 'slfactor' to slow down loading ! : HEADER ( -<name>- ) \ build a header BL WORD COUNT (HEADER) slow ; \ self-call the header word in-system ! : ALIAS ( xt -<name>- ) \ W32F \ *G Creates an alias of a word that is non-imediate (unless IMMEDIATE is used). \ *P NOTE View of either name can go to the synonym instead (it depends which name --- 4423,4432 ---- : SLOW ( -- ) slfactor ms start/stop ; \ set 'slfactor' to slow down loading ! : HEADER ( "name" -- ) \ build a header BL WORD COUNT (HEADER) slow ; \ self-call the header word in-system ! : ALIAS ( xt "name" -- ) \ W32F \ *G Creates an alias of a word that is non-imediate (unless IMMEDIATE is used). \ *P NOTE View of either name can go to the synonym instead (it depends which name *************** *** 4515,4519 **** ALIGN HERE DUP ANON ! :COLONDEF ; ! : : ( -<name>- ) \ Forth's primary function defining word HEADER HIDE ANON OFF :COLONDEF ; --- 4515,4519 ---- ALIGN HERE DUP ANON ! :COLONDEF ; ! : : ( "name" -- ) \ Forth's primary function defining word HEADER HIDE ANON OFF :COLONDEF ; *************** *** 4533,4543 **** in-system ! : CONSTANT ( n -<name>- ) \ create a constant (unchangeable) value HEADER DOCON COMPILE, , ; ! : VARIABLE ( -<name>- ) \ create a variable (changeable) value CREATE 0 , ; ! : DEFER ( -<name>- ) \ create a deferred execution function \ *G create a deferred execution function, defaults to a NOOP \ ** Typical usage ' new-action is deferred-action --- 4533,4543 ---- in-system ! : CONSTANT ( n "name" -- ) \ create a constant (unchangeable) value HEADER DOCON COMPILE, , ; ! : VARIABLE ( "name" -- ) \ create a variable (changeable) value CREATE 0 , ; ! : DEFER ( "name" -- ) \ create a deferred execution function \ *G create a deferred execution function, defaults to a NOOP \ ** Typical usage ' new-action is deferred-action *************** *** 4548,4555 **** COMPILE NOOP ; ! : USER ( n -<name>- -- ) \ create a user variable (changeable) value HEADER DOUSER COMPILE, , ; ! : NEWUSER ( size -<name>- -- ) \ Creates a user. A user can be \ a byte, cell, float, string or stack NEXT-USER @ SWAP OVER + NEXT-USER ! --- 4548,4555 ---- COMPILE NOOP ; ! : USER ( n "name" -- ) \ create a user variable (changeable) value HEADER DOUSER COMPILE, , ; ! : NEWUSER ( size "name" -- ) \ Creates a user. A user can be \ a byte, cell, float, string or stack NEXT-USER @ SWAP OVER + NEXT-USER ! *************** *** 4570,4574 **** next c; ! : 2VARIABLE ( -<name>- ) \ create a double variable VARIABLE 0 , ; --- 4570,4574 ---- next c; ! : 2VARIABLE ( "name" -- ) \ create a double variable VARIABLE 0 , ; *************** *** 4592,4596 **** in-system ! : IS ( xt -<name>- ) \ assign xt to a defer STATE @ IF COMPILE (IS) ' ?IS COMPILE, --- 4592,4596 ---- in-system ! : IS ( xt "name" -- ) \ assign xt to a defer STATE @ IF COMPILE (IS) ' ?IS COMPILE, *************** *** 4605,4609 **** \ -------------------- Value ------------------------------------------------ ! : VALUE ( n -<name>- ) \ create a self fetching changeable value HEADER \ 'n TO value-name' will change a value DOVALUE COMPILE, --- 4605,4609 ---- \ -------------------- Value ------------------------------------------------ ! : VALUE ( n "name" -- ) \ create a self fetching changeable value HEADER \ 'n TO value-name' will change a value DOVALUE COMPILE, *************** *** 5112,5118 **** \ \ Local variables can have any name except -- \ or } ! \ NOTE: { a -<name>- } declares two locals; it doesn't indicate a parsing word ! \ { a -- -<name>- } is the only correct method \ Added | as alternative for \, as it matches John Hayes' syntax better \ \ Improved factoring --- 5112,5119 ---- \ \ Local variables can have any name except -- \ or } ! \ NOTE: { a "name" } declares two locals; it doesn't indicate a parsing word ! \ { a -- "name" } is the only correct method \ Added | as alternative for \, as it matches John Hayes' syntax better + \ Added {: [a b c] [| [d e f]] [-- comments] :} as per Forth200x \ \ Improved factoring *************** *** 5154,5158 **** THEN ; IMMEDIATE ! : LOCALALLOC: ( n1 -<name>- ) \ allocate a local n1 byte buffer to local "name" ?COMP [COMPILE] LOCALALLOC [COMPILE] TO ; IMMEDIATE --- 5155,5159 ---- THEN ; IMMEDIATE ! : LOCALALLOC: ( n1 "name" -- ) \ allocate a local n1 byte buffer to local "name" ?COMP [COMPILE] LOCALALLOC [COMPILE] TO ; IMMEDIATE |