Why not add an explicit init function to reinit that variable whenever you need it?
IMO it's not the job of HRB engine to solve such programming tasks. Such setting has not much point anyway as you may have multiple STATIC vars with different init requirement inside on .hrb. Moreover it makes your code dependent on the way its invoked/loaded. Brgds, Viktor On 2009 Nov 12, at 12:44, Adam Lubszczyk wrote: > > Hi! > > Sample code: > ****** hrbcode.prg (or PCODE dll) ***** > FUNCTION abc() > STATIC x:=99 > ++x > RETURN x > ******* main.prg ********** > PROCEDURE main() > LOCAL i,h > FOR i:=1 TO 3 > h:=HB_HRBLOAD("hrbcode.hrb") > ?? &("abc()") > ?? &("abc()") > HB_HRBUNLOAD(h) > NEXT > ************************ > Show: > 100 101 102 103 104 105 > I wont work as: > 100 101 100 101 100 101 > > Is option for HB_HRBLOAD() (also HB_LIBLOAD() for dll) that always > "reinitalize" static variables ? > > Adam > -- > View this message in context: > http://old.nabble.com/STATIC-variables-in-HRB-and-PCODE-DLL-tp26315403p26315403.html > Sent from the Harbour - Dev mailing list archive at Nabble.com. > > _______________________________________________ > Harbour mailing list > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour