XGRASS compilation

Bob Black black at hercules.calspan.com
Thu Feb 17 15:55:43 EST 1994


Chris,

[...]

> I am still using xgen (writing a new script today, as a matter of fact).
> I saw  your question about xgen table, but didn't respond since I
> haven't played with tables. Meanwhile, passing variables is doable
> (but like other things with xgen, sometimes you have to go about
> it in a round-about way).

If anyone has an answer to the table question, please let me know.
The only examples I've seen use hard coded numbers rather than
variables to access table cells.

> One way is with shell environmental variables. Another method I use
> which may or may not be usefull to you (depending on what you are 
> doing) is making use of the fact that an xgen script is first read
> by cpp (the C language preprocessor), so one can make use of some
> of its capabilities. For instance, I have a header file wherein I
> set up a bunch of parameters like colors, fonts, x-y locations, and
> such that can be used by a number of xgen scripts by using the cpp
> #define and #include references.

I knew about cpp but only used it to do #defines at the top of the
xgen script.  It did seem to have trouble with arithmetic operators
though.

Putting stuff in a header file is a good idea I didn't think of.
Thanks for mentioning it.

- Bob (black at calspan.com)



More information about the grass-user mailing list