[fpc-pascal] specify variable name with string variable
Stefan V. Pantazi
svpantazi at gmail.com
Tue Jul 9 02:39:25 CEST 2019
Haev a look at rtti and the functionality available in the typinfo unit.
The tests included in fpc are a good resource. Have a look at the
trtti*.pp tests:
https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/tests/test/
Start with trtti4.pp and work your way up to more complex examples.
On 7/8/19 6:04 PM, James Richters wrote:
> I’m curious how use classes together with published properties would work, is there a sample of how to use this somewhere?
>
> James
>
>
>
> From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> On Behalf Of Sven Barth via fpc-pascal
> Sent: Monday, July 8, 2019 5:31 PM
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Cc: Sven Barth <pascaldragon at googlemail.com>
> Subject: Re: [fpc-pascal] specify variable name with string variable
>
>
>
> James Richters <james at productionautomation.net <mailto:james at productionautomation.net> > schrieb am Mo., 8. Juli 2019, 22:44:
>
> SetStoragePinByName('Ini_Opto_Enable_Positive_Pin', True) ;
>
> And it would somehow get the value of 'Ini_Opto_Enable_Positive_Pin
>
>
>
> That indeed sounds like something where you could use classes together with published properties. At least if you're willing to spend a bit of effort.
>
>
>
> Regards,
>
> Sven
>
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
--
_______________________________________________________
More information about the fpc-pascal
mailing list