我正在用帕斯卡编写一个程序。但不知何故,我不明白其原因的错误。你能帮忙吗?
Program main;
Procedure A(n : longint);
Procedure B(n : longint);
Procedure E(n : longint);
Procedure D(n : longint);
begin
WriteLn ('In D. No Call...');
end;
begin
WriteLn ('In E ');
D(n);
end;
begin
WriteLn ('In B ');
WriteLn ('Calling A Do -1 ',n);
if n = 1
then
A(1);
end;
begin
WriteLn ('In A ');
B(n);
WriteLn ('Calling B ',n);
if(n<1)
then
begin
C(n);
end;
end;
begin
A(1);
end.
我正在尝试从主 proc 调用 proc A,然后 A 调用 B 等等。但是我在 C 中遇到编译错误:
Here are the errors I get:
Free Pascal Compiler version 2.2.0 [2009/11/16] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling prog.pas
prog.pas(32,14) Error: Identifier not found "C"
prog.pas(32,17) Error: Illegal expression
prog.pas(37,4) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)