Re: [fpc-pascal] Managed record questions

2018-03-15 Thread Ryan Joseph


> On Mar 9, 2018, at 11:19 PM, Sven Barth via fpc-pascal 
>  wrote:
> 
> Because this way the user is aware that they are something special and are 
> not supposed to be called manually. 
> 

That makes sense.

Why can’t the compiler use a similar method to call a function when a stack 
based construct like a record or object goes in/out of scope? We have the 
management operators now (which are more complicated) and reference counted 
interfaces (I never used those before they sound like the current standard for 
“ARC” in FPC but nothing which is a low-level compiler feature.

After doing some C++ work this week it appears they simply call the 
constructor/destructor for stack based structs/classes when they go in/out of 
scope and on class member variables when their parent class goes in/out of 
scope. It’s very simple but cleans up so many scenarios that exist in FPC so 
I’m curious why we never got this feature.

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Sqlite error sqlite3_extended_errcode SIGSDEV (better format)

2018-03-15 Thread Santiago A.
El 14/03/2018 a las 19:26, Luca Olivetti escribió:
> El 14/03/18 a les 18:50, Santiago A. ha escrit:
>
>>   I downloaded the last version of sqlite3.dll and now it works. Was my
>> dll corrupted or was too old and hadn't such entry?. Nevertheless, I
>> think this check of nil should be done, or check the version and rise
>> "Not valied for this version". A SIGSDEV may drive you nuts.
>
> According to https://sqlite.org/changes.html, sqlite3_extended_errcode
> was added in version 3.6.5 in 2008.
>
> Bye
Yeah, my version is a little outdated ;-). I searched sqlite3.dll in
this computer and I found more than fifteen instances, it looks like
each application installs its own instance of the dll. So there are a
lot of versions. I'm replacing a Delphi5 small utility, so probably it
was one of the oldest.

Nevertheless, it wouldn't be a bad idea to check the minimal version
after loading the lib.

-- 
Saludos

Santiago A.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal