Re: [fpc-pascal] Custom dataset help request: ftCurrency/ftDateTime returns weird data

2013-10-04 Thread Marco van de Voort
In our previous episode, Reinier Olislagers said: missing something. The relevant code: function TTransactionDataset.GetFieldData(Field: TField; Buffer: Pointer): boolean; ... Result := true; case Field.FieldName of 'HashID': StrPLCopy(Buffer,

Re: [fpc-pascal] Custom dataset help request: ftCurrency/ftDateTime returns weird data

2013-10-04 Thread Jonas Maebe
On 04 Oct 2013, at 15:43, Marco van de Voort wrote: In surprise that it compiles. If buffer is an (untyped) pointer, buffer^ is a byte afaik No, it's untyped (void). Just like an untyped var/out parameter, which you can also cast to anything and assign things to. (just sizeof() it).

[fpc-pascal] use cwstring or fpwidestring on linux

2013-10-04 Thread ko paka
Hello, Are there some practical differences which one to use on linux ? When I will use only fpwidestring, then when use functions CompareUnicodeString / CompareWideString and current_Collation is nil, then routine is recalled on OldManager, where those functions are not implemented. Because of

Re: [fpc-pascal] does Advanced Record constructor automatically zero all the memory space of that record?

2013-10-04 Thread Sven Barth
On 04.10.2013 14:48, Dennis Poon wrote: You can use either FillChar as you did or use Self := Default(TTest); (default is a compiler intrinsics that returns a 0 value of the type you passed in, e.g. Nil for classes, '' for strings, 0 for ordinals and for records all fields are set to 0) How

Re: [fpc-pascal] use cwstring or fpwidestring on linux

2013-10-04 Thread Sven Barth
On 04.10.2013 18:13, ko paka wrote: Hello, Are there some practical differences which one to use on linux ? When I will use only fpwidestring, then when use functions CompareUnicodeString / CompareWideString and current_Collation is nil, then routine is recalled on OldManager, where those

Re: [fpc-pascal] FPC 2.6.2 for DOS/Go32V2 FP.EXE cannot run a second time

2013-10-04 Thread Lubomír Čabla
OK, how do I know that this is corrected? Or I will try next time. On Wed, Oct 2, 2013 at 2:25 AM, Tomas Hajny xhaj...@hajny.biz wrote: On 30 Sep 13, at 17:47, LubomĂ­r ÄŚabla wrote: Attempt to compile IDE: OS Windows XP 32 CZ FPC GO32V2 2.6.2 is installed in z:\pp PATH contains

Re: [fpc-pascal] use cwstring or fpwidestring on linux

2013-10-04 Thread stdreamer
On 04/10/2013 9:08 μμ, Sven Barth wrote: The main difference is that cwstring uses the Widestring manager of the system's C library while fpwidestring is a full Pascal Widestring manager. So by using cwstring instead of fpwidestring am I safe to assume that the widestrings used and returned

Re: [fpc-pascal] use cwstring or fpwidestring on linux

2013-10-04 Thread Sven Barth
On 04.10.2013 21:15, stdreamer wrote: On 04/10/2013 9:08 μμ, Sven Barth wrote: The main difference is that cwstring uses the Widestring manager of the system's C library while fpwidestring is a full Pascal Widestring manager. So by using cwstring instead of fpwidestring am I safe to assume

Re: [fpc-pascal] use cwstring or fpwidestring on linux

2013-10-04 Thread stdreamer
On 04/10/2013 10:44 μμ, Sven Barth wrote: On 04.10.2013 21:15, stdreamer wrote: On 04/10/2013 9:08 μμ, Sven Barth wrote: The main difference is that cwstring uses the Widestring manager of the system's C library while fpwidestring is a full Pascal Widestring manager. So by using cwstring

Re: [fpc-pascal] use cwstring or fpwidestring on linux

2013-10-04 Thread Sven Barth
On 04.10.2013 22:14, stdreamer wrote: On 04/10/2013 10:44 μμ, Sven Barth wrote: On 04.10.2013 21:15, stdreamer wrote: On 04/10/2013 9:08 μμ, Sven Barth wrote: The main difference is that cwstring uses the Widestring manager of the system's C library while fpwidestring is a full Pascal

Re: [fpc-pascal] FPC 2.6.2 for DOS/Go32V2 FP.EXE cannot run a second time

2013-10-04 Thread Tomas Hajny
On Fri, October 4, 2013 20:15, Lubomír Čabla wrote: OK, how do I know that this is corrected? By checking the date and time of the generated source ZIP file on FTP or just trying? Normally, it should be there the next day after committing the fixes to SVN. If I remember correctly, the ZIP files

Re: [fpc-pascal] does Advanced Record constructor automatically zero all the memory space of that record?

2013-10-04 Thread Dennis Poon
Thanks a lot for clarification. Dennis Sven Barth wrote: On 04.10.2013 14:48, Dennis Poon wrote: You can use either FillChar as you did or use Self := Default(TTest); (default is a compiler intrinsics that returns a 0 value of the type you passed in, e.g. Nil for classes, '' for strings, 0