"Prof A Olowofoyeku (The African Chief)" wrote:
... snip ...
One option was to have "{$borland-pascal}" and such before the call, and then have "{$gnu-pascal}" afterwards to turn off the BP mode. However, this now breaks other things: e.g.,
function foo (const p; size : cardinal) : Integer; begin [...] inc (count); {$delphi} move (p, values^[count]^, size); { will now compile } {$gnu-pascal} result := count; end;
The assignment to "result" will no longer compile, whatever you pass at the command line, because under GPC 20050331, "{$gnu-pascal}" means that "result" is no longer predefined :-(
So, why not just write "foo := count" ? -- Some useful references about C: <http://www.ungerhu.com/jxh/clc.welcome.txt> <http://www.eskimo.com/~scs/C-faq/top.html> <http://benpfaff.org/writings/clc/off-topic.html> <http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99) <http://www.dinkumware.com/refxc.html> (C-library} <http://gcc.gnu.org/onlinedocs/> (GNU docs)