Re: Differences between type_checks(was RE: haha very funny)

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu