Re: An elegant, EUPHORIA solution
- Posted by Scott Murray <FaIkon1313 at AOL.COM> Feb 05, 1999
- 458 views
Ya know...I think you've got it! <G> Well, a fairly good solution, anyway. >constant MY_STRUCTURE = > {routine_id("integer"), > routine_id("string"), > routine_id("user_defined_type")} However, that bit won't work. I did have a version of your type_all() function called setOf(), that does the same thing. When creating it, I found out that you can't call routine_id() on the built-in types. First you have to wrap them. type blah_integer( object v ) return( integer( v ) ) end type global constant INTEGER = routine_id( "blah_integer" ) Now you can say something like: >constant MY_STRUCTURE = > {INTEGER, etc, etc The type_structure() routine, however, is brilliant in it's simplicity. (which is probably why I never thought of it... :)