Re: [fpc-pascal] inline and other modifiers

2011-12-22 Thread Jonas Maebe
On 22 Dec 2011, at 02:27, nore...@z505.com wrote: Another thing freepascal allows is for OVERLOAD to be declared one place but not the other. Delphi is more strict in this regard. That's fixed in svn trunk. Also delphi is more strict when it comes to PROGRAM name parsing. In freepascal th

Re: [fpc-pascal] inline and other modifiers

2011-12-21 Thread noreply
> On 12/21/2011 20:27, nore...@z505.com wrote: >> >> Also delphi is >> more strict when it comes to PROGRAM name parsing. In freepascal the >> program name can mismatch the file name, whereas delphi stops compiling >> and tells you error. > > i've never known this (program name must equal filename)

Re: [fpc-pascal] inline and other modifiers

2011-12-21 Thread waldo kitty
On 12/21/2011 20:27, nore...@z505.com wrote: Also delphi is more strict when it comes to PROGRAM name parsing. In freepascal the program name can mismatch the file name, whereas delphi stops compiling and tells you error. i've never known this (program name must equal filename) to be a require

Re: [fpc-pascal] inline and other modifiers

2011-12-21 Thread noreply
> > On 17 Dec 2011, at 11:29, Bernd wrote: > >> But I am still surprised that inline can be declared in either of the >> two sections ( I am not complaining, I am actually glad it works for >> my particular application). Is there any recommended style, is it bad >> practice to put it into the imple

Re: [fpc-pascal] inline and other modifiers

2011-12-17 Thread Jonas Maebe
On 17 Dec 2011, at 11:29, Bernd wrote: > But I am still surprised that inline can be declared in either of the > two sections ( I am not complaining, I am actually glad it works for > my particular application). Is there any recommended style, is it bad > practice to put it into the implementatio

Re: [fpc-pascal] inline and other modifiers

2011-12-17 Thread Bernd
2011/12/16 Jonas Maebe : > Inline is not a calling convention, nor does it affect the calling convention. You are right, its not a calling convention and declaring a different convention in the implementation indeed does not work. But I am still surprised that inline can be declared in either of

Re: [fpc-pascal] inline and other modifiers

2011-12-16 Thread Jonas Maebe
On 16 Dec 2011, at 21:36, Bernd wrote: > This seems to compile and work as intended, no matter which of the two > implementations I choose. But I wonder how this can work? I always > thought that what is written in the interface section is > authoritative. How can the compiler properly use this u

[fpc-pascal] inline and other modifiers

2011-12-16 Thread Bernd
I have the following: unit foo; {$mode objfpc}{$H+} interface uses foobar; function BitCnt(ABitmap: TBitBoard): Integer; implementation {$ifdef cpu386} function BitCnt(ABitmap: TBitBoard): Integer; assembler; register; nostackframe; asm ... end; {$else} function BitCnt(ABitmap: TBitBoard)