Re: [fpc-pascal] Possible bug in Numeric test

2016-02-27 Thread steveg
Drat, that was a bad assumption of mine - sorry I meant it fails for any of E1 or E2 entries so any entry beginning with E and then a following number eg: IsNum('E1'); Sorry for the poor example On 25/02/16 03:54, Vojtěch Čihák wrote: I tried your function in FPC 3.0.0 in mode ObjFPC and it

Re: [fpc-pascal] Primitive Record Wrappers

2016-02-27 Thread silvioprog
On Sat, Feb 27, 2016 at 2:49 PM, Mazola Winstrol wrote: > I've implemented a new version. For this version i created a mock class to > use with FHasValue (the previous implementation uses a hack to the > interface internal layout). > Thanks for share that. It seems a very useful unit. unit Null

Re: [fpc-pascal] Primitive Record Wrappers

2016-02-27 Thread Mazola Winstrol
2016-02-27 0:49 GMT-03:00 Dmitry Boyarintsev : > On Fri, Feb 26, 2016 at 10:38 PM, Mazola Winstrol > wrote: > >> In the code bellow, the generic type TNullableTyple is implemented (and >> incomplete for now). >> > How to reset TNullableType to Null value? HasValue seems to be read-only. > In the

Re: [fpc-pascal] Primitive Record Wrappers

2016-02-27 Thread Mazola Winstrol
I've implemented a new version. For this version i created a mock class to use with FHasValue (the previous implementation uses a hack to the interface internal layout). unit NullableTypes; {$mode delphi}{$H+} interface type { TMockInterfacedObject } TMockInterfacedObject = class(TObject

Re: [fpc-pascal] Forcibly terminating a thread

2016-02-27 Thread Mark Morgan Lloyd
Jonas Maebe wrote: On 27/02/16 12:40, Mark Morgan Lloyd wrote: Is there a way of sending an unambiguous system-level kill signal to a thread? KillThread(ThreadID) doesn't appear to be brutal enough, and I'm unsure of the correct way to access pthread_kill(). You cannot asynchronously kill thre

Re: [fpc-pascal] Codepage + class helper raises "Error identifier idents no member ..."

2016-02-27 Thread Bart
On 2/27/16, Sven Barth wrote: > That definitely shouldn't be the case. Please report. Done. http://bugs.freepascal.org/view.php?id=29745 Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listi

Re: [fpc-pascal] Codepage + class helper raises "Error identifier idents no member ..."

2016-02-27 Thread Bart
On 2/27/16, Bart wrote: >> It seems to do it for any codepage you insert. > > And it disappears if you comment out the {H+} directive. It's the combination of - codepage - {$H+} - var s: string = ''; Removing the initiaiation of the local string var (replace it with: "var s: string") makes com

Re: [fpc-pascal] Codepage + class helper raises "Error identifier idents no member ..."

2016-02-27 Thread Bart
On 2/27/16, Bart wrote: > It seems to do it for any codepage you insert. And it disappears if you comment out the {H+} directive. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc

Re: [fpc-pascal] Codepage + class helper raises "Error identifier idents no member ..."

2016-02-27 Thread Bart
On 2/27/16, Sven Barth wrote: > That definitely shouldn't be the case. Please report. It seems to do it for any codepage you insert. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/

Re: [fpc-pascal] Forcibly terminating a thread

2016-02-27 Thread Jonas Maebe
On 27/02/16 12:40, Mark Morgan Lloyd wrote: Is there a way of sending an unambiguous system-level kill signal to a thread? KillThread(ThreadID) doesn't appear to be brutal enough, and I'm unsure of the correct way to access pthread_kill(). You cannot asynchronously kill threads on Unix platform

[fpc-pascal] Forcibly terminating a thread

2016-02-27 Thread Mark Morgan Lloyd
I've got a program here which, under some conditions of testing, ends up with a thread stuck inside a system call (detail: a mainframe emulator, which is still trying to read a damaged punched card when the operator hits the power-off button). Is there a way of sending an unambiguous system-le

Re: [fpc-pascal] Primitive Record Wrappers

2016-02-27 Thread Sven Barth
Am 27.02.2016 09:36 schrieb "Maciej Izak" : > > 2016-02-27 4:38 GMT+01:00 Mazola Winstrol : >> >> In the code bellow, the generic type TNullableTyple is implemented (and incomplete for now). >> > > It can be done more optimal with incoming operators Initialize and Finalize. I have working implement

Re: [fpc-pascal] Codepage + class helper raises "Error identifier idents no member ..."

2016-02-27 Thread Sven Barth
Am 26.02.2016 20:31 schrieb "silvioprog" : > > Hello, > > Consider the following code: > > === code === > > program project1; > > {$mode objfpc}{$H+} > //{$codepage utf8} > > uses Classes; > > type > TFoo = class helper for TStream > public > procedure Bar; > end; > > procedure TFoo.Bar

Re: [fpc-pascal] Primitive Record Wrappers

2016-02-27 Thread Maciej Izak
2016-02-27 4:38 GMT+01:00 Mazola Winstrol : > In the code bellow, the generic type TNullableTyple is implemented (and > incomplete for now). > > It can be done more optimal with incoming operators Initialize and Finalize. I have working implementation but I need to adjust the code to the FPC compi