Re: [fpc-devel]Minor differences with Delphi

2003-11-07 Thread David Butler
On Fri, 7 Nov 2003 09:15:17 +0100 (CET), you wrote: I had a look at Kylix's RaiseLastOSError function. It uses GetLastError which calls '__errno_location' from 'libc.so.6'. On Windows this uses the GetLastError WinAPI call. This is Delphi's implementation for RaiseLastOSError: [/me pinches

[fpc-devel]Bug or missing documentation?

2003-11-07 Thread BiPolar
Hello. The code below gives: foo.pas(13,33) Error: Duplicate identifier NAME when compiled with -S2. It compiles ok with -Sd though. The thing is, I coudn't find any reference to this difference of behavior under the Compiler Modes section of FPC docs, neither in other sections. Is this a bug,

[fpc-devel]FreePascal and AnsiStrings

2003-11-07 Thread David Butler
Hi FPC developers I see FreePascal uses the following internal format for AnsiStrings: Ptr - 8 : Length Ptr - 4 : Reference Count Ptr : Characters Delphi uses the following format: Ptr - 8 : Reference Count Ptr - 4 : Length Ptr : Characters My questions are: 1. Is the order purely incidental

Re: [fpc-devel]Operator overloading question.

2003-11-07 Thread Peter Vreman
Hello. While trying to use the operator overload feature of FPC, I find out a restriction not mentioned on the documentation. One can overload several operators but not the comparison one (=); this, at least, while operating on classes. The code below shows this situation (commenting out

Re: [fpc-devel]Bug or missing documentation?

2003-11-07 Thread Peter Vreman
Hello. The code below gives: foo.pas(13,33) Error: Duplicate identifier NAME when compiled with -S2. It compiles ok with -Sd though. The thing is, I coudn't find any reference to this difference of behavior under the Compiler Modes section of FPC docs, neither in other sections. Is this a

[fpc-devel]IntToHex difference

2003-11-07 Thread David Butler
Hi A small difference between FreePascal and Delphi's IntToHex function: FreePascal's IntToHex function interprets the Digits parameter as the 'maximum number of digits'. Delphi interprets it as the 'minimum number of digits'. For example, FreePascal IntToHex($10, 1) = '0', whereas Delphi

Re: [fpc-devel]FreePascal and AnsiStrings

2003-11-07 Thread Peter Vreman
1. Is the order purely incidental or is there a reason why FreePascal chose to use a different order than Delphi? incidental 2. I know it is officially discouraged to use 'internal formats', but for optimization's sake, would it be safe to assume that the internal format for FreePascal's

Re: [fpc-devel]FreePascal and AnsiStrings

2003-11-07 Thread Marco van de Voort
[ Charset ISO-8859-1 unsupported, converting... ] 1. Is the order purely incidental or is there a reason why FreePascal chose to use a different order than Delphi? incidental 2. I know it is officially discouraged to use 'internal formats', but for optimization's sake, would it be

Re: [fpc-devel]Bug in AssignPipe() on Linux

2003-11-07 Thread Vincent Snijders
On Fri, 7 Nov 2003 05:15:13 -0800 (PST) Jeff Pohlmeyer [EMAIL PROTECTED] wrote: Using the latest version of the compiler, and I am having a problem with the popen() function on Linux. It looks like popen() fails because AssignStream() fails, because AssignPipe() fails, and that's about

Re: [fpc-devel]Bug in AssignPipe() on Linux

2003-11-07 Thread Peter Vreman
Using the latest version of the compiler, and I am having a problem with the popen() function on Linux. It looks like popen() fails because AssignStream() fails, because AssignPipe() fails, and that's about as far as I got. ( I'm lost when it comes to the do_SysCall() stuff. ) FAILS:

[fpc-devel]Format() incompatibility with Delphi

2003-11-07 Thread Michalis Kamburelis
Hi What should Format('%d %d %0:d %d', [0, 1, 2, 3]) return ? Delphi help is clear about that : Setting the index specifier affects all subsequent formatting, so it should return '0 1 0 1' (and it does when compiled with Delphi). FPC help is not clear about that. And unfortunately it turns

Re: [fpc-devel]Operator overloading question.

2003-11-07 Thread BiPolar
Peter Vreman wrote: class=class operatorion is handled by the compiler and can't be overloaded. Clear as water. Maybe you could include this explanation on the docs, so people like me (new to operator overloading) doesn't ask again. what do you want to compare? the address of the class or

Re: [fpc-devel]Bug or missing documentation?

2003-11-07 Thread BiPolar
The code below gives: foo.pas(13,33) Error: Duplicate identifier NAME when compiled with -S2. It compiles ok with -Sd though. [...] Is this a bug, or I missed something in the docs? It is a decision that we made for fpc mode to force you to write code that is less buggy. Because

[fpc-devel]Building FPC 1.9.1 on BeOS

2003-11-07 Thread BiPolar
Hello. While trying to build FPC from today CVS sources on the BeOS platform (using make beoszip from the root directory): I had to add two paths on the Makefile.fpc (./rtl/beos/) : -- [compiler] includedir=$(INC) $(PROCINC) $(UNIXINC) $(RTL)/objpas/classes $(RTL)/ objpas/sysutils

[fpc-devel]function overloading resolution order question

2003-11-07 Thread David Butler
Hi How does FreePascal resolve ambigious calls to overloaded functions? For example, if we have two procedures: procedure Test(const X: Integer); overload; procedure Test(const X: Extended); overload; If a call is made to Test(1), the procedure with the Integer parameter is called. When we

[fpc-devel]Compiler runtime error when using WideString character constant

2003-11-07 Thread David Butler
Hi I am using FreePascal 1.9.0[2003/11/05]. For the following code, the compiler crashes with Runtime error 216 at 0x004467CA. type RR = record RA : WideString; end; const Z : RR = (RA: 'B'); The compiler does not crash if the 'B' is changed to a string of more than one character,