Re: [fpc-pascal] Lazarus better than delphi

2014-03-20 Thread Dennis Poon
m...@rpzdesign.com wrote: I have been using Delphi 7 forever. I evaluated Delphi xe5 Update 2. Today, I use Lazarus 1.2 and FPC 2.6.2. Lazarus/FPC is just better than Delphi. All development on Mac/Windows is now with Lazarus. You FPC/Lazarus guys ROCK. Best wishes for 2014. md I would

[fpc-pascal] Lazarus better than delphi

2014-03-20 Thread m...@rpzdesign.com
I have been using Delphi 7 forever. I evaluated Delphi xe5 Update 2. Today, I use Lazarus 1.2 and FPC 2.6.2. Lazarus/FPC is just better than Delphi. All development on Mac/Windows is now with Lazarus. You FPC/Lazarus guys ROCK. Best wishes for 2014. md _

Re: [fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Juha Manninen
On Thu, Mar 20, 2014 at 3:25 PM, Virgo Pärna wrote: > I did try googling and it appears, that in 64 bit Delphi XE2 uses THandle > as a result type. Anyway, in the case of error, it returns > INVALID_HANDLE_VALUE, > which is DWORD(-1). >So, under Windows it would be possible to use same co

Re: [fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > > IMHO the universal handle (for e.g. IPC related handles and file handles) is > > not a portable concept to begin with. > > I think the concept of a handle as an opaque type is universal. What > isn't safe is any assumption of consistent behavio

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-20 Thread Dennis Poon
I tried, the results are: @@character_set_client : utf8 @@character_set_connection : latin1 @@character_set_database : latin1 Dennis, do you received my reply?: IMO @@character_set_connection is wrong and must be utf8. I will try fix it, but first can you try as workaround this: - a

Re: [fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Mark Morgan Lloyd
Marco van de Voort wrote: IMHO the universal handle (for e.g. IPC related handles and file handles) is not a portable concept to begin with. I think the concept of a handle as an opaque type is universal. What isn't safe is any assumption of consistent behaviour, e.g. that select() may be ap

Re: [fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Virgo Pärna
On Thu, 20 Mar 2014 13:02:28 +0100 (CET), Michael Van Canneyt wrote: > > Shortly said: No. The Delphi API is wrong; It should also return THandle > (as that is what Windows CreateFile returns), but probably for historical > reasons they still use Integer. > With the advent of 64-bit delphi, th

Re: [fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Michael Van Canneyt
On Thu, 20 Mar 2014, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Question: what is the best way to maintain code that must compile with both FPC and Delphi2007? The obvious solution is to use IFDEF and define a new type, say TMyHandle. FPC's libraries however

Re: [fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > Question: what is the best way to maintain code that must compile with > > both FPC and Delphi2007? > > The obvious solution is to use IFDEF and define a new type, say TMyHandle. > > FPC's libraries however take care of many platform difference

Re: [fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Michael Van Canneyt
On Thu, 20 Mar 2014, Juha Manninen wrote: FileCreate and FileOpen return THandle with FPC but integer with Delphi2007. Delphi defines THandle as LongWord but for some reason Integer is used instead. With FPC on a 64-bit system THandle is 64- bit unsigned. Question: what is the best way to mai

Re: [fpc-pascal] Error compile library on Linux.

2014-03-20 Thread Fred van Stappen
> It's quite possible that there is nevertheless a bug, but you will have to > provide the source code required to reproduce it and compilation > instructions, otherwise there is nothing we can do (as always). Hum, not too much answer here... ;-( Re-resumed : Units/Project => https://github.com/g

[fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Juha Manninen
FileCreate and FileOpen return THandle with FPC but integer with Delphi2007. Delphi defines THandle as LongWord but for some reason Integer is used instead. With FPC on a 64-bit system THandle is 64- bit unsigned. Question: what is the best way to maintain code that must compile with both FPC and

Re: [fpc-pascal] Linking object file

2014-03-20 Thread Darius Blaszyk
Thanks Tomas, I did a quick test and it works perfectly! Regards, Darius Tomas Hajny schreef op 20 mrt '14: > On Wed, March 19, 2014 23:49, Darius Blaszyk wrote: > > Hi, > >> I was wondering if it's possible to link FPC object files by using the $Link >> directive? At least I have tro

Re: [fpc-pascal] Linking object file

2014-03-20 Thread Tomas Hajny
On Wed, March 19, 2014 23:49, Darius Blaszyk wrote: Hi, > I was wondering if it's possible to link FPC object files by using the > $Link directive? At least I have troubles in getting this to work and > therefore I'm asking here. Please consider the minimal example I have > attached to this emai

Re: [fpc-pascal] Cloning objects?

2014-03-20 Thread Michael Schnell
On 03/19/2014 11:01 PM, Timothy Groves wrote: Is there a drop-dead simple way to clone an object? AFAIK, there are good reasons, why any class needs to implement it's own dedicated "assign" method to be cloneable. -Michael ___ fpc-pascal maillist -

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-20 Thread LacaK
Dennis Poon wrote / napísal(a): I tried, the results are: @@character_set_client : utf8 @@character_set_connection : latin1 @@character_set_database : latin1 Dennis, do you received my reply?: IMO @@character_set_connection is wrong and must be utf8. I will try fix it, but fir