/* lib/setvariables.ccc : to generate sm1-package setvariables.sm1 */ /* sm1(" (incmac.sm1) run (slib.sm1) run "); sm1(" (factor-a.sm1) run "); run does not work!! */ sm1(" 0 @@@.indexMode "); /* C-like notation of matrix. a[0], ... */ def getxvar(i) { sm1( "[(x) (var) ", i , " ..int ] system_variable /FunctionValue set "); } def getdvar(i) { sm1( "[(D) (var) ", i , " ..int ] system_variable /FunctionValue set "); } def getvarn() { sm1( "[(N)] system_variable (universalNumber) dc /FunctionValue set "); } def SetRingVariables() { /* Don't use local variables in this function, because we set global variables in this function. cf. SSWork/yacc/memo.txt, 1997,3/6 */ Print("SetRingVariables() Setting the global variables : "); setRingVariables002(0,sm1( "[(CC)] system_variable (universalNumber) dc ")); setRingVariables002(sm1( "[(C)] system_variable (universalNumber) dc "), sm1( "[(LL)] system_variable (universalNumber) dc ")); setRingVariables002(sm1( "[(L)] system_variable (universalNumber) dc "), sm1( "[(MM)] system_variable (universalNumber) dc ")); setRingVariables002(sm1( "[(M)] system_variable (universalNumber) dc "), sm1( "[(NN)] system_variable (universalNumber) dc ")); Ln(); } def void setRingVariables002(tmp002_p,tmp002_q) { /* tmp002_ must not be used as variables names. */ local tmp002_i,tmp002_v,tmp002_str; for (tmp002_i=tmp002_p;tmp002_i