Ralf Hemmecke wrote:
> How do I programm such mutual recursion in SPAD?
>
> BTW, in fact I want a global store (here represented by
>
> h: XHashTable(String, ConstructorData) := empty()
>
> which will be filled whenever some data is computed. Otherwise
> ConstructorDataBase should simply serve as cache.
1) You need to correct 'getConstructorData':
getConstructorData(s: String): % ==
constructorData(s)$ConstructorDataBase pretend %
(Spad compiler do not see that % is the same as ConstructorData
so we need 'pretend' here).
2)
)boot $bootStrapMode := true
)compile foo.spad
)boot $bootStrapMode := false
)compile foo.spad
--
Waldek Hebisch
heb...@math.uni.wroc.pl