When I try to make a call to the system() procedure, I get this compiler error:
testex.p: In function `program_Testex': testex.p:4: undeclared identifier `System' (first use this function) testex.p:4: (Each undeclared identifier is reported only once testex.p:4: for each function it appears in.)
Is there something else I must include in my program? I am using gpc-2.0 compiled for the linux 2.0 platform.
----Geoffrey Arnold--- garnold@cyberdrive.net
On Wed, 18 Mar 1998, Geoffrey Arnold wrote:
Date: Wed, 18 Mar 1998 09:14:42 -0500 (EST) From: Geoffrey Arnold garnold@cyberdrive.net To: gpc@hut.fi Subject: system()
When I try to make a call to the system() procedure, I get this compiler error:
testex.p: In function `program_Testex': testex.p:4: undeclared identifier `System' (first use this function) testex.p:4: (Each undeclared identifier is reported only once testex.p:4: for each function it appears in.)
Is there something else I must include in my program? I am using gpc-2.0 compiled for the linux 2.0 platform.
----Geoffrey Arnold--- garnold@cyberdrive.net
It works beautifully, but you must include the definition in your procedures/functions section:
Procedure system ( parameters ); C; or Function system ( parameters ); C;
I don't remember the parameters for the system() function, but "man system" should tell you. The C; at the end is important and the "system" as opposed to "System" or "SYSTEM" is important too.
====================================================================== Jim Roland, running the most stable operating system in the world: OS/2 v4.0--I TALK to my OS, and IT LISTENS, does yours? ----------------------------------- Running Internet Servers on OS/2 & Linux (a free & stable Unix OS) ----------------------------------- Get free PGP software today to keep your files & messages private! Don't let ANYONE deprive you of your right to privacy!! ======================================================================
Hi Folks,
the following construction fails:
assign(ip,'input_file'); reset(ip);
repeat readln(ip,...... until eof(ip);
reset(ip); { <<<< This is the point where the shit hits the fan... }
I think it is legal. (It is surely OK under TP.)
I am running IRIX 6.2, GPC 2.0.
Cheers,
miklos
the following construction fails:
assign(ip,'input_file'); reset(ip);
repeat readln(ip,...... until eof(ip);
reset(ip); { <<<< This is the point where the shit hits the fan... }
In GPC you need to close the file before calling reset/rewrite again. Add the statement 'close(ip)' before the second reset, and everything should work.
I think it is legal. (It is surely OK under TP.)
This issue has been raised before on the mailing list, but I am not sure whether it is bug or a feature.....
Jesper Lund
On Wed, 18 Mar 1998, Geoffrey Arnold wrote:
Date: Wed, 18 Mar 1998 09:14:42 -0500 (EST) From: Geoffrey Arnold garnold@cyberdrive.net To: gpc@hut.fi Subject: system()
When I try to make a call to the system() procedure, I get this compiler error:
testex.p: In function `program_Testex': testex.p:4: undeclared identifier `System' (first use this function) testex.p:4: (Each undeclared identifier is reported only once testex.p:4: for each function it appears in.)
Is there something else I must include in my program? I am using gpc-2.0 compiled for the linux 2.0 platform.
----Geoffrey Arnold--- garnold@cyberdrive.net
BTW, it looks like you are using that in line 4. This isn't a uses statement is it? "Uses System" is not necessary in linux gpc.
====================================================================== Jim Roland, running the most stable operating system in the world: OS/2 v4.0--I TALK to my OS, and IT LISTENS, does yours? ----------------------------------- Running Internet Servers on OS/2 & Linux (a free & stable Unix OS) ----------------------------------- Get free PGP software today to keep your files & messages private! Don't let ANYONE deprive you of your right to privacy!! ======================================================================