More ... | ブロック構文っぽいもの匿名ラベルに引き続き、ブロック構文っぽい構文を提供するマクロ。 abdata notesel, noteunsel※noteunselの仕様上、入れ子は1つまでです。 #define global ctype note(%1) %tnotesel_unsel notesel %1: gosub *%i: noteunsel: if 0 : *%o
sdim buf1, 256
sdim buf2, 256
note( buf1 ) {
noteadd "This is buf1"
note( buf2 ) {
noteadd "This is buf2"
noteadd "----buf2----"
return
}
noteadd "----buf1----"
return
}
mes buf1
mes buf2
newmod, delmod※newmodの引数は指定できないです…なにかいい方法はないものか #define global ctype mod(%1,%2) %tmod newmod %1,%2 : gosub *%i : delmod %1 : if 0 : *%o
#module a var1
#modinit
mes "ModInit"
var1 = "ModFunc"
return
#modterm
mes "ModTerm"
return
#modfunc func
mes var1
return
#global
mod ( test, a ) {
func test
return
}
|