Re: [fpc-pascal] Debug info at runtime?

2015-05-27 Thread Serguei TARASSOV
I answered myself :) Hope this helps someone. Here is an example how to get N-2 calling procedure Warning: code seeking debugging info is slow so be aware to use it in loops. Make sure to compile with -gl (not requierd but show file and line numbers info) -gs (show proc name after address) var

Re: [fpc-pascal] Boring problem when I try to create a database using SQLdb (again)

2015-05-27 Thread Ladislav Karrach
Dňa 16.5.2015 o 19:19 silvioprog napísal(a): On Sat, May 16, 2015 at 1:51 PM, Michael Van Canneyt mich...@freepascal.org mailto:mich...@freepascal.org wrote: On Sat, 16 May 2015, silvioprog wrote: [...] Set the stoUseImplicit option on the transaction:

Re: [fpc-pascal] File handling: the TFileStream or the classical way is faster and more efficient?

2015-05-27 Thread Jürgen Hestermann
Am 2015-05-27 um 09:38 schrieb Michael Schnell: On 05/26/2015 06:25 PM, Jürgen Hestermann wrote: If you copy thousands of files with only a few bytes each then it may become very noticable, what else is done (in additon to the pure OS copy of the files). I don't think so. Opening the file

[fpc-pascal] DateTimeToStr: 2958466, 00 is not a valid TDatetime encoding, maximum value is 2958466, 00

2015-05-27 Thread silvioprog
Hello, This code works fine in Delphi 7 / XE 7: var D: TDateTime; S: string; begin D := MaxDateTime; S := DateTimeToStr(D); end; Return: 12/31/ 11:59:59 PM. But, in FPC (from trunk), I got a EConvertError: 2958466,00 is not a valid TDatetime encoding, maximum value is 2958466,00

Re: [fpc-pascal] DateTimeToStr: 2958466, 00 is not a valid TDatetime encoding, maximum value is 2958466, 00

2015-05-27 Thread silvioprog
On Wed, May 27, 2015 at 3:46 PM, silvioprog silviop...@gmail.com wrote: Hello, This code works fine in Delphi 7 / XE 7: var D: TDateTime; S: string; begin D := MaxDateTime; S := DateTimeToStr(D); end; Return: 12/31/ 11:59:59 PM. But, in FPC (from trunk), I got a

Re: [fpc-pascal] DateTimeToStr: 2958466, 00 is not a valid TDatetime encoding, maximum value is 2958466, 00

2015-05-27 Thread Michael Van Canneyt
On Wed, 27 May 2015, silvioprog wrote: Hello, This code works fine in Delphi 7 / XE 7: var   D: TDateTime;   S: string; begin   D := MaxDateTime;   S := DateTimeToStr(D); end;  Return: 12/31/ 11:59:59 PM. But, in FPC (from trunk), I got a EConvertError: 2958466,00 is not a valid

Re: [fpc-pascal] How can I write a multithread program as simple as possible?

2015-05-27 Thread Sven Barth
Am 27.05.2015 09:49 schrieb Michael Schnell mschn...@lumino.de: Delphi does provide easy to use library calls for this (using the Anonymous syntax). AFAIK, fpc does have the Anonymous syntax since some time, and hopefully the library will be enhanced for such parallel loops some day soon. Where

Re: [fpc-pascal] DateTimeToStr: 2958466, 00 is not a valid TDatetime encoding, maximum value is 2958466, 00

2015-05-27 Thread silvioprog
On Wed, May 27, 2015 at 6:22 PM, Michael Van Canneyt mich...@freepascal.org wrote: On Wed, 27 May 2015, silvioprog wrote: Hello, This code works fine in Delphi 7 / XE 7: var D: TDateTime; S: string; begin D := MaxDateTime; S := DateTimeToStr(D); end; Return: 12/31/

Re: [fpc-pascal] File handling: the TFileStream or the classical way is faster and more efficient?

2015-05-27 Thread Michael Schnell
On 05/26/2015 06:25 PM, Jürgen Hestermann wrote: If you copy thousands of files with only a few bytes each then it may become very noticable, what else is done (in additon to the pure OS copy of the files). I don't think so. Opening the file is a tedious task for the OS. So I suppose the

Re: [fpc-pascal] How can I write a multithread program as simple as possible?

2015-05-27 Thread Michael Schnell
On 05/26/2015 06:12 PM, Géza Kovacs Géza wrote: I read the Wiki about this article, it's looks like very complicated for me. :-( AFAIK, there are examples on how to create TThreads in the fpc Wiki. OTOH performance optimization via threads on multi-Core systems is not the original target of