[fpc-pascal]range-checking observations and questions

2003-10-03 Thread Andy Sy
Apparently, activating -Cr is needed to enable enforcement of compile time constant range checking as well. The ff. program: program blah; var E: array[2..4] of Integer; begin E[10]:=15; end. will compile albeit with a warning. Only when -Cr is enabled will the range violation become an error

[fpc-pascal].ppu and .o files

2003-10-03 Thread Andy Sy
Upon compiling the freepascal compiler from cvs, I noticed a lot of .o and .ppu files generated in addition to the final executable. What is the difference between .o and .ppu files and can I delete them both to eliminate the clutter? ___ fpc-pascal mai

[fpc-pascal]switch suboption usage

2003-10-02 Thread Andy Sy
fpc accepts -glc, but will it work? Or does one need to do -gl -gc? For the help screen, what does the after the switch invocation actually mean? You have multiple -g, -a, -s and -i suboptions, but they are not indicated as -g, -a, -s and -i. Also, how does one figure out from the help screen w

[fpc-pascal]Fast answers in the mailing list

2003-10-02 Thread Andy Sy
Woah... those answers sure are coming in fast! Am I on IRC? :-) ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]No runtime range checking?

2003-10-02 Thread Andy Sy
Michael Van Canneyt wrote: Delphi doesn't compile your program: malpertuus: ~ >dcc32 /CC -$$R+ -$$P+ -$$V+ testr.pp Borland Delphi Version 13.0 Copyright (c) 1983,99 Inprise Corporation E:\root\testr.pp(16) Error: Incompatible types: 'stringy' and 'String' E:\root\testr.pp(17) Error: Incompatibl

[fpc-pascal]Re: An 'all debug options enabled' command line switch

2003-10-02 Thread Andy Sy
> Might be a good idea to be able to compact > > -Cr -Co -CR -Ct -Ci > > into a single switch? -Cdebug or something like > that Hmm... answering my own question... I guess -CritoR is easy enough to remember... it should work like -v, right? -- = reply-

Re: [fpc-pascal]No runtime range checking?

2003-10-02 Thread Andy Sy
Lee, John wrote: You might want to put -gl in there too, so if there is run time error it tells you where...J Ah... how nice... FreePascal is s elegant and easy to use compared to C. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freep

[fpc-pascal]An 'all debug options enabled' command line switch

2003-10-02 Thread Andy Sy
Might be a good idea to be able to compact -Cr -Co -CR -Ct -Ci into a single switch? -Cdebug or something like that -- = reply-to: a n d y @ n e t f x p h . c o m http://www.neotitans.com Web and Software Development

Re: [fpc-pascal]No runtime range checking?

2003-10-02 Thread Andy Sy
Andy Sy wrote: program blah; type stringy = array[4..10] of char; var C: stringy; D: array[2..5] of char; procedure showstring(I:Integer); begin Write(C[I]); end; begin C:='ABCDEFGHIJKLMNOPQRSTUVWXYZ'; D:='ABCDEFGHIJKLMNOPQRSTUVWXYZ'; Writeln(D); showstring(-

[fpc-pascal]No runtime range checking?

2003-10-02 Thread Andy Sy
program blah; type stringy = array[4..10] of char; var C: stringy; D: array[2..5] of char; procedure showstring(I:Integer); begin Write(C[I]); end; begin C:='ABCDEFGHIJKLMNOPQRSTUVWXYZ'; D:='ABCDEFGHIJKLMNOPQRSTUVWXYZ'; Writeln(D); showstring(-5); end. FPC doesn't even complain abo

[fpc-pascal]Getting the size of an array

2003-10-02 Thread Andy Sy
In Delphi (the later versions I suppose), it is possible to get the size of an array, and not just the size of a String, using Length() Is this not available yet in FreePascal or is there another way of doing it? You can use SizeOf, but then you'd have to get the SizeOf the type of the array first

[fpc-pascal]/usr/bin/ld: cannot find -lgd errorr

2003-09-29 Thread Andy Sy
I've noticed that in many of the example programs that come with FreePascal, trying to compile them results in an link error where ld claims it cannot find a particular library (I'm getting one for gd) even though the corresponding library file is present in /usr/local/lib/fpc/1.0.10/units/linux/li