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.
Regards
David Wood QinetiQ Farnborough
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 our Customer Contact Centre may be recorded for quality control, regulatory and monitoring purposes.
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.
Hello David,
I just noticed that you complained about changes in gpc that break your programs. Unfortunatly, more changes are coming. Namely im main program you have:
PROCEDURE test(request:integer); EXTERNAL name 'test';
and in a module:
PROCEDURE test(request:integer) ;
This will stop working realy soon. I am working on qualified identifiers and to support them properly we _have to_ change external name corresponding to Pascal name. If you need to call Pascal routine by its link name you should specify the link name. Whith recent gpc you should use:
PROCEDURE test(request:integer) ; attribute(name='test');
If you need something that works with old versions of gpc use:
PROCEDURE test(request:integer) ; asmname 'test';
(but the second form will stop working in future versions).