MODULE.F of Win32Forth
INTERNAL ( -- ) \ W32F Module System
If a module hasn't yet been started or the internal vocabulary isn't the context vocabulary add the internal vocabulary to the search order and save the current vocabulary as the external vocabulary, then make the current vocabulary the internal vocabulary.
If a module is already being built then make the current vocabulary the internal vocabulary.
如果尚未啟動模塊或內部詞彙表不是上下文詞彙表,則將內部詞彙表添加到搜索順序中並將當前詞彙表保存為外部詞彙表,然後將當前詞彙表作為內部詞彙表。
如果已經構建了一個模塊,那麼將當前詞彙表作為內部詞彙表。
: EXTERNAL ( -- ) \ W32F Module System
Make the external vocabulary the current vocabulary.
使外部詞彙成為當前詞彙。
: MODULE ( -- ) \ W32F Module System
Complete the module by making the external vocabulary the current vocabulary, removing the internal vocabulary from the search order if it's the context vocabulary and resetting the internal vocabulary to hidden.
INTERNAL ok
variable cyn ok
' cyn dup .definition-class
4494156 VARIABLE CYN Value = 0 ok
MODULE ok
' cyn dup .definition-class
^^^
Error(-13): CYN is undefined
INTERNAL ok
' cyn dup .definition-class
4494156 VARIABLE CYN Value = 0 ok
MODULE ok
' cyn dup .definition-class
Error(-13): CYN is undefined
.definition-class
^^^^^^^^^^^^^^^^^
Error(-13): .DEFINITION-CLASS is undefined