Length & Shortcircuit
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Jun 23, 1998
- 444 views
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