Re: Differences between type_checks(was RE: haha very funny)
- Posted by euphoria at carlw.legend.uk.com Oct 23, 2001
- 340 views
Robert Craig wrote: > Chris Bensler writes: > > > How about type checking an object? I know it's redundant, > > but you can do it. Does object() actually do any tests, > > or does it just return TRUE every time? > > It just returns TRUE every time. It's first thing in the morning here, so maybe I'm not thinking too clearly, but maybe we could have object() return FALSE if the parameter (which would have to be a variable for this to work) is undefined? e.g.: --- integer s ? object(s) -- prints 0 s = 27 ? object(s) -- prints 1 --- Or would that break too much existing code? Come to think of it, what *does* object() do if it's parameter is undefined? Does it complain before returning TRUE, or does it return TRUE and carry on regardless? Carl