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
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.