Lazarus
Programming => Packages and Libraries => Lazarus Extra Components => Topic started by: palacs on June 14, 2018, 10:58:37 am
-
Hi All,
I would like to include unit strutils into a Pascal Script but I have not found any SIRegister_ or RIRegister_ functions (like RIRegister_stdctrls for unit stdctrls) that would import it. Is it even possible?
Thanks
-
I guess you have to do it yourself. The original PascalScript package comes with a utility to generate import unit from existing one, but I can't find it in the one shipped with Lazarus. It was a Windows executable with no source AFAIR, probably that's why.
-
Good to know it's possible.
Is there any step-by-step howto or documentation on how to do the import with that tool?
Have you (or anyone else) done this before?
-
Is there any step-by-step howto or documentation on how to do the import with that tool?
I cannot find a definitive one, so my advice would be to look at StrUtils' friend: DateUtils, which has both uPSR_dateutils and uPSC_dateutils as imported units for PascalScript. A small tutorial explaining the concept with actual code is here: https://lawrencebarsanti.wordpress.com/2009/11/28/introduction-to-pascal-script/
Have you (or anyone else) done this before?
Nope, never had a need before.