Hello, Badri; hello, everybody!
According to Badri Gomatam:
(i have gcc 2.7.2)...thinking "i'll just do gpc on these files and all will be OK "...:)
(Better don't think that. Even TP6 failed to recompile my TP5 sources out of the box; upgrading to BP7 was even more complicated, but the difference between 16-bit-BP and 32-bit-GPC is crucial, although we are working hard on improving compatibility.;-)
- ASSIGN statement appears as undeclared identifier (use this function
first.. sounds like a gcc type error for undeclared function identifiers) isn't this a "standard" pascal fn?
No, it isn't.
if not, what do i do now?
Get a recent beta version of GNU Pascal which supports `Assign' from
ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/
which is also reachable from the GPC home page
http://home.pages.de/~gnu-pascal/
- all directives were flagged as errors
Not *all*! ;-)
e.g {$O+ foo) was unrecognized
Yes. GPC does not care about overlays and does not (yet!) check for overflowing ordinal types.
($I+ foo) was OK, complained couldn't open the file foo.pas (which turned out to be right).. so the syntax of {$xx} appears to work
GPC's directives are quite different from those of BP. Better write something like
(*$ifdef __GPC__ *)
(* Directives for GNU Pascal *)
(*$N+*) (* nested comments *) (*$E+*) (* allow C-style char escapes in strings *)
(*$else *)
(* Directives for Borland Pascal *)
(*$N+*) (* use the numeric coprocessor *) (*$E+*) (* link the emulator in case there is no coprocessor *)
(*$endif *)
One problem: There is no (*$ifopt FOO+- *) yet in GPC; if your programs contain this directive, you have to take them out.
does anybody know what that means, and how I could move to gpc smoothly: is there a list of stuff in BP5.0 that's NOT in GPC and vice versa?
See the GPC online documentation, `info -f gpc'. There is one chapter about differences between GPC and BP which is somehow outdated (many things which are described as "unimplemented" there are implemented now) but may still be useful for you.
am i in trouble with many other built in functions..e.g I do need the DELAY function (i think it's built in) to wait a given delay time is this available in gpc?
Not yet for Linux. You can use the `select' function from the system library to implement it:
(*$X+*) (* Don't warn about ignored function return value *)
Type TimeValPtr = ^TimeVal; TimeVal = record sec, usec: Integer; end (* TimeVal *);
Function select ( n: Integer; ReadFDS, WriteFDS, ExceptFDS: Pointer; TimeOut: TimeValPtr ): Integer; C;
Procedure Delay ( ms: Integer );
Var TimeOut: TimeVal;
begin (* Delay *) TimeOut.sec:= ms div 1000; TimeOut.usec:= 1000 * ( ms mod 1000 ); select ( 0, Nil, Nil, Nil, @TimeOut ); end (* Delay *);
many thanks ( and i have a feeling i'll be posting many msgs to this forum)
Be welcome! :-)
Hmm ... you will probably miss the BP standard units for GPC running on Linux. If you want to contribute to GPC, you can download the `BPcompat' package (written for DOS/DJGPP) from
ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/contrib/
and try to get as much as possible run on Linux.
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005] maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]