Length & Shortcircuit

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

atom a
a = 123
? length(a)

Why does this generate an error anyways.
I would prefer if it would return 1, since an atom operates the same as an
one element sequence!

This would make short-circuit even less usable.
I often type something like this

integer len

if atom (x) then
    len = 1
else
    len = length(x)
end if

I can't think of any reason to crash when I request a length, actually.

Ralf

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

Search



Quick Links

User menu

Not signed in.

Misc Menu