[fpc-devel] Does FreePascal support named parameters?
vfclists at gmail.com
Tue Apr 2 23:00:04 CEST 2013
On 2 April 2013 04:37, Anthony Walter <sysrpl at gmail.com> wrote:
> Name parameters are supported through variants.
> procedure Test(V: Variant);
> V.SomeMethod(12, ParamOne := '', ParamTwo := 12.5);
> Internally what happens is V is checked to for IDispatch, next
> GetIDsOfNames is called to find the dispid of SomeMethod, then a variant
> array of arguments is constructed (with the names), and finally Invoke is
> This comes from the Microsoft COM concept of "automation",
> though automation encompasses a bit more than IDispatch, including
> marshalling, remoting, and error handling; passing errors back from a
> remote machine for example.
> People don't really use this stuff much anyone, nor is their much demand
> for people with knowledge of the inner workings of COM. But if you want,
> you can write your own objects which implement IDispatch.
> See the source code in the download link on this page:
> ScripTools.pas class TScriptlet which exposes arbitrary pascal methods and
> fpc-devel maillist - fpc-devel at lists.freepascal.org
Does this work on Linux as well, or is it only for Windows?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel