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-boun...@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@lists.freepascal.org>
Cc: Sven Barth <pascaldra...@googlemail.com>
Subject: Re: [fpc-pascal] specify variable name with string variable

James Richters <ja...@productionautomation.net 
<mailto:ja...@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@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


--
_______________________________________________________
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to