Re: Implementing structures
- Posted by Irv Mullins <mountains at MINDSPRING.COM> Apr 23, 1998
- 593 views
At 02:53 PM 4/23/98 -0700, David Cuny wrote: > > constant structure( "listbox" ) -- new type of structure > element( "location", "coords" ) -- already defined > element( "size", "coords" ) -- ditto > element( "caption", "sequence" ) -- gets type checking > element( "maxlen", "atom" ) -- ditto > ... etc > >Since we are passing the data type along with the element name, we know what test to perform during data checking. > Hmm... looks pretty good. How do we handle user-defined type checking? Checking for the usual suspects (atom, integer, sequence) could be done with a simple if atom ... elsif integer... elsif sequence sort of logic. But we can't get a routine_id for a type: coords for example. More hardcoding? Irv