Thanks Waldek,
That's a really big help. Having migrated from DEC Pascal which had very different MODULE integration syntax I had never picked up on the importance of the IMPORT clause, especially as the code has always compiled without a hitch. I wonder if there is any way gpc can pick up on the use of declarations which haven't been properly initialised, either at compile time or run-time?
Regards, David Wood.
-----Original Message----- From: Waldek Hebisch [mailto:hebisch@math.uni.wroc.pl] Sent: Tuesday, September 16, 2003 12:44 PM To: Wood David Cc: gpc@gnu.de Subject: Re: Module global string bug
David Wood wrote:
Frank,
I don't know if there is a bug number for this but I am
attaching two really
small bits of code which show it up. It's the only
'genuine' bug I have
ever really come across in gpc. Basically, the globally
defined string
doesn't seem to get any length so whenever something is
assigned to it, the
contents vanish.
Your program is buggy: you forgot to 'import' your module. Even if you want to access objects in the module via external name you still need to 'import' it so its inititializer is run automatically. If you want main program to be in other language, then you need to call 'init_With_string' explicitly.
-- Waldek Hebisch hebisch@math.uni.wroc.pl or hebisch@hera.math.uni.wroc.pl
The Information contained in this E-Mail and any subsequent correspondence is private and is intended solely for the intended recipient(s). For those other than the recipient any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on such information is prohibited and may be unlawful.
Emails and other electronic communication with QinetiQ may be monitored. Calls to QinetiQ may be recorded for quality control, regulatory and monitoring purposes.