Go to the first, previous, next, last section, table of contents.


Using GUILE

If your version of GRG has been compiled with support for GUILE (you will get a banner saying so when you start it up) then you can define equates in the scheme language rather than the GRG language. The resulting equates can be used in exactly the same way as those defined in the native language - they can be called from native language equates and from text bodies. They cannot be used where a reversed equate is required. A native language equate can pass any number of arguments to the GUILE equate (the types of which will be silently mapped) and the GUILE equate can return a numeric or string argument to the native language equate. From the GUILE side any native language equate can be directly called if it takes no arguments or only one argument and if it returns one argument this will be returned as the result. There are also some additional functions that can be called from the GUILE side defined below. This support is relatively untested.

A scheme equate is defined with the EQGUILE predefined macro. Arguments must currently be given as a white space separated list following the name of the equate (as seen from the native language side and the GUILE side). You should not include the define construct as this will be wrapped around automatically (to include the specified arguments). Any define commands used within the body of the scheme equate will only be visible from the GUILE side.


Go to the first, previous, next, last section, table of contents.