Global Constant
JonnyMac
Posts: 9,197
Is it possible to create a master constant that will trickle down through all objects under the "top object"? Specifically, I'd like to set the project frequency (_clkfreq) in the top object and have it apply to everything underneath that has a timing requirement (without editing the child objects).
Comments
But, I suppose you could have an object with all your constants in it and just include that object in all your files...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
For example:
The once-off overhead of the few bytes required to import the constants file is usually worth it.
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
Is there some reason you need specific access to a user-defined _clkfreq instead of using the already-global clkfreq contained in long[noparse][[/noparse]0]?
-Phil