Greetings, fellow GPC users. Despite trying the solutions suggested in the faq (http://agnes.dida.physik.uni-essen.de/~gnu-pascal/faq.html), I'm no nearer to getting an environment variable successfully into my program. For example, suppose I want to get the PATH environment variable into the program as a string that I can then work on?
Can anyone help? I know zero C, and I prefer my pascal as plain as possible; I don't use Borland extensions.
By the way - developers thank you. I've used GPC to compile the [B/D] Bayes linear statistics package. It is about 28000 lines of dense (mostly uncommented: shame on me) code, which probably exploits every nook and cranny of the pascal language (e.g. it makes heavy use of height-balanced binary trees using record variants). The same code (after minor translations) also compiles under Borland Pascal, the Berkely unix compiler, and the SUN pascal compiler. We get the same answers for all our test routines, and the graphics implementation (hooking to Tcl/Tk) also works properly. I didn't expect GPC to do it, but (although it took a lot of time rewriting the code to avoid GPC bugs, such as substr) it does work. A linux version of [B/D] will be released as soon as I can get getenv() to work!
David.