=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/asir.texi,v retrieving revision 1.17 retrieving revision 1.20 diff -u -p -r1.17 -r1.20 --- OpenXM/src/asir-doc/parts/asir.texi 2004/07/10 05:50:57 1.17 +++ OpenXM/src/asir-doc/parts/asir.texi 2020/09/08 09:16:57 1.20 @@ -1,4 +1,4 @@ -@comment $OpenXM: OpenXM/src/asir-doc/parts/asir.texi,v 1.16 2004/07/04 00:16:43 takayama Exp $ +@comment $OpenXM: OpenXM/src/asir-doc/parts/asir.texi,v 1.19 2014/03/11 01:46:19 takayama Exp $ \BJP @node ユーザ言語 Asir,,, Top @chapter ユーザ言語 Asir @@ -402,9 +402,9 @@ each element is again a vector which contains ${_I}C_J$ @end tex @end iftex -@ifinfo +@ifnottex ICJ -@end ifinfo +@end ifnottex \JP を要素とする配列である. \EG as its elements. @@ -1556,6 +1556,8 @@ def demo() @{ モジュールは入れ子にはできない. モジュールの中だけで使う大域変数は @code{static} で宣言する. この変数はモジュールの外からは参照もできないし変更もできない. +@code{static} 変数はすべての関数定義の前に宣言しないといけない. +パーサーがワンパスのため, 宣言のない変数は自動的に局所変数とみなされるからである. モジュールの外の大域変数は @code{extern} で宣言する. \E \BEG @@ -1566,7 +1568,10 @@ and A variable of a module is declared with the key word @code{static}. The static variables cannot be refered nor changed out of the module, but it can be refered and changed in any functions in the module. -A global variable which can be refered and changed at any place +The @code{static} variables must be declared before the definitions of functions, +because the one-path parser of asir automatically assume variables as local variables +if there is no declaration for them. +A global variable which can be refered and changed in or out of the module is declared with the key word @code{extern}. \E @@ -1632,7 +1637,7 @@ The below is an example of demand loading. \E @example -if (!module_definep("stack")) load("stack.rr") $ +if (!module_definedp("stack")) load("stack.rr") $ @end example \BJP