Re: wishlist : structures
- Posted by Al Getz <xaxo at AOL.COM> Nov 07, 2000
- 478 views
Koda, I like the idea of structures too, but i have used the following to emulate some simple structures which only have to be accessed by other Euphoria code. For example: my.width=145 my.height=233 become: sequence my constant WIDTH=1, HEIGHT=2 my={0,0} my[WIDTH]=145 my[HEIGHT]=233 the only drawback is if you need WIDTH and HEIGHT for another struc, you might have to super class all the constants: sequence my constant my_WIDTH=1, my_HEIGHT=2 my={0,0} my[my_WIDTH]=145 my[my_HEIGHT]=233 sequence her constant her_WIDTH=2, her_HEIGHT=1 her={0,0} her[her_WIDTH]=145 her[her_HEIGHT]=233 I've used this method in several large programs and can still understand what is being done after reading through the code several months later. Hope this helps some. --Al