Re: [fpc-pascal] Size of program vs library ?

2014-02-04 Thread Michael Van Canneyt
On Mon, 3 Feb 2014, Fred van Stappen wrote: Date: Mon, 3 Feb 2014 18:30:57 +0100 From: mich...@freepascal.org To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Size of program vs library ? On Mon, 3 Feb 2014, Fred van Stappen wrote: Hello. Here size of nude program

[fpc-pascal] SVN revisions and builds

2014-02-04 Thread Constantine Yannakopoulos
Hi all, We use FPC trunk for the development of several projects and we download it from ftp://freepascal.dfmk.hu/pub/lazarus/snapshots/ However for FPC 2.7.1, the latest build is from September. Is there any plan to update it? Or is there a more updated ftp directory somewhere else we could

[fpc-pascal] Nested generic parameters

2014-02-04 Thread Constantine Yannakopoulos
Hello again, Can I use a defined generic type parameter inside a constraint of the same generic declaration on FPC trunk code? Something like: {$mode Delphi} type TFooT = class end; TGenericT, U: TFooT = class end; This compiles in Delphi XE or later but in FPC it gives the error

Re: [fpc-pascal] Size of program vs library ?

2014-02-04 Thread Fred van Stappen
If I am correct, the compiler will add the PIC by itself. But someone of the compiler team should confirm this... Michael. Yep, Michael, many thanks for answer. Sorry to insist on that, but the size of fp library is very too big vs other libraries (C for example). But there are huge

Re: [fpc-pascal] Size of program vs library ?

2014-02-04 Thread Sven Barth
Am 04.02.2014 13:35, schrieb Fred van Stappen: Sorry to insist on that, but the size of fp library is very too big vs other libraries (C for example). The size of FPC libraries will always(*) be bigger then e.g. C ones, because in FPC the RTL is statically linked into the program/library,

Re: [fpc-pascal] SVN revisions and builds

2014-02-04 Thread Sven Barth
Am 04.02.2014 11:35, schrieb Constantine Yannakopoulos: We use FPC trunk for the development of several projects and we download it from ftp://freepascal.dfmk.hu/pub/lazarus/snapshots/ However for FPC 2.7.1, the latest build is from September. Is there any plan to update it? Or is there a

Re: [fpc-pascal] Nested generic parameters

2014-02-04 Thread Sven Barth
Am 04.02.2014 11:48, schrieb Constantine Yannakopoulos: Hello again, Can I use a defined generic type parameter inside a constraint of the same generic declaration on FPC trunk code? Something like: {$mode Delphi} type TFooT = class end; TGenericT, U: TFooT = class end; This

[fpc-pascal] TSQLQuery UniDirectional and SaveToStream

2014-02-04 Thread Dimitrios Chr. Ioannidis
Hi all, i will appreciate a little help / advice / anything for the following problem i'm having. I need to use the xmldatapacketreader to transfer datasets between free pascal and delphi. The problem i'm having is that i can't use UniDirectional and SaveToStream at the same time (

Re: [fpc-pascal] Size of program vs library ?

2014-02-04 Thread Fred van Stappen
(*) Once dynamic runtime packages are supported this might change though... Regards, Sven Ok, thanks Sven, that will be the best... But before the triumph of fp, i will do that universal audio open source library with fp too... Many thanks for all of you, fp

[fpc-pascal] DefaultFormatSettings usage

2014-02-04 Thread silvioprog
Hello, I'm using this configuration: initialization DefaultFormatSettings.DateSeparator := '-'; DefaultFormatSettings.TimeSeparator := ':'; DefaultFormatSettings.ShortDateFormat := '-mm-dd'; DefaultFormatSettings.ShortTimeFormat := 'hh:nn:ss'; but, when i try: var t: TDateTime;

Re: [fpc-pascal] DefaultFormatSettings usage

2014-02-04 Thread Dimitrios Chr. Ioannidis
Hi, Στις 4/2/2014 3:54 μμ, ο/η silvioprog έγραψε: Hello, I'm using this configuration: initialization DefaultFormatSettings.DateSeparator := '-'; DefaultFormatSettings.TimeSeparator := ':'; DefaultFormatSettings.ShortDateFormat := '-mm-dd'; DefaultFormatSettings.ShortTimeFormat :=

Re: [fpc-pascal] DefaultFormatSettings usage

2014-02-04 Thread silvioprog
2014-02-04 Dimitrios Chr. Ioannidis d.ioanni...@nephelae.eu: Hi, Στις 4/2/2014 3:54 μμ, ο/η silvioprog έγραψε: Hello, I'm using this configuration: initialization DefaultFormatSettings.DateSeparator := '-'; DefaultFormatSettings.TimeSeparator := ':';

Re: [fpc-pascal] DefaultFormatSettings usage

2014-02-04 Thread Marco van de Voort
In our previous episode, silvioprog said: Worked with: var t: TDateTime; begin t := StrToDateTime('2013-02-04 11:39:54'); end; sorry, I forgot to use the function StrToDateTime. :S Or use http://www.freepascal.org/docs-html/rtl/dateutils/scandatetime.html

Re: [fpc-pascal] fp universal library ?

2014-02-04 Thread Christo
On Sun, 2014-02-02 at 23:13 +0100, Fred van Stappen wrote: - Here example for function inside a class of myunit: library mylib ; uses myunit; function mylibclassfunction() : integer; cdecl; var myclass : TMyUnitClass; /// class defined in myunit (if can be a variable outside the

[fpc-pascal] TSortedCollection dupes ordering

2014-02-04 Thread waldo kitty
i have a TSortedCollection that i'm allowing duplicate keys to be inserted in... the problem that i'm having is that the duplicate keys are in reverse order from how they were inserted... i am overriding MyCollection^.Insert because i have additional tasks that need to be done at the time

Re: [fpc-pascal] DefaultFormatSettings usage

2014-02-04 Thread waldo kitty
On 2/4/2014 8:54 AM, silvioprog wrote: t := StrToDate('2013-02-04 11:39:54'); // to format -mm-dd hh:nn:ss the above is StrToDate but you are also sending the time... you would see similar if you were sending the above string to StrToTime... StrToDate only accepts date formats as

Re: [fpc-pascal] TSortedCollection dupes ordering

2014-02-04 Thread Jim Leonard
On 2/4/2014 1:40 PM, waldo kitty wrote: i have a TSortedCollection that i'm allowing duplicate keys to be inserted in... the problem that i'm having is that the duplicate keys are in reverse order from how they were inserted... Sounds like your TSortedCollection.Compare() needs additional

Re: [fpc-pascal] TSortedCollection dupes ordering

2014-02-04 Thread waldo kitty
On 2/4/2014 3:28 PM, Jim Leonard wrote: On 2/4/2014 1:40 PM, waldo kitty wrote: i have a TSortedCollection that i'm allowing duplicate keys to be inserted in... the problem that i'm having is that the duplicate keys are in reverse order from how they were inserted... Sounds like your

Re: [fpc-pascal] fp universal library ?

2014-02-04 Thread Fred van Stappen
- Here example for function inside a class of myunit: library mylib ; uses myunit; function mylibclassfunction() : integer; cdecl; var myclass : TMyUnitClass; /// class defined in myunit (if can be a variable outside the function) begin result := -1 ;

Re: [fpc-pascal] fp universal library ?

2014-02-04 Thread Fred van Stappen
Now what I would like in the compiler is a warning: potential memory leak at myclass := TMyUnitClass.Create; ;) Oops, prior message was cut... Yep, before to get that sympathetic message, i changed the code, now all the class.create are done inside the unit used by the library and i will

Re: [fpc-pascal] TSortedCollection dupes ordering

2014-02-04 Thread Frederic Da Vitoria
2014-02-04 waldo kitty wkitt...@windstream.net: On 2/4/2014 3:28 PM, Jim Leonard wrote: On 2/4/2014 1:40 PM, waldo kitty wrote: i have a TSortedCollection that i'm allowing duplicate keys to be inserted in... the problem that i'm having is that the duplicate keys are in reverse order from

Re: [fpc-pascal] TSortedCollection dupes ordering

2014-02-04 Thread waldo kitty
On 2/4/2014 5:16 PM, Frederic Da Vitoria wrote: 2014-02-04 waldo kitty wkitt...@windstream.net mailto:wkitt...@windstream.net: [...] i kinda thought about that earlier when i was digging thru the code... IIRC, insert was overridden because there are cases where the existing record

Re: [fpc-pascal] DefaultFormatSettings usage

2014-02-04 Thread silvioprog
2014-02-04 waldo kitty wkitt...@windstream.net: On 2/4/2014 8:54 AM, silvioprog wrote: t := StrToDate('2013-02-04 11:39:54'); // to format -mm-dd hh:nn:ss the above is StrToDate but you are also sending the time... you would see similar if you were sending the above string to

Re: [fpc-pascal] DefaultFormatSettings usage

2014-02-04 Thread silvioprog
2014-02-04 Marco van de Voort mar...@stack.nl: In our previous episode, silvioprog said: Worked with: var t: TDateTime; begin t := StrToDateTime('2013-02-04 11:39:54'); end; sorry, I forgot to use the function StrToDateTime. :S Or use

Re: [fpc-pascal] DefaultFormatSettings usage

2014-02-04 Thread silvioprog
2014-02-05 silvioprog silviop...@gmail.com: 2014-02-04 Marco van de Voort mar...@stack.nl: In our previous episode, silvioprog said: Worked with: var t: TDateTime; begin t := StrToDateTime('2013-02-04 11:39:54'); end; sorry, I forgot to use the function StrToDateTime. :S