scalar is the advertised way to do this and the only one that offers these exact semantics. (Even your prototyped function is simply exactly the same as scalar itself.) What do you have against it?
Makeshifts last the longest.
In reply to Re: how to force scalar context (without scalar())?
by Aristotle
in thread how to force scalar context (without scalar())?
by borisz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |