Re: String concatenation design
- From: andy@xxxxxxxxxxxxxxxxxxxxxxxxx
- Date: 28 Mar 2006 02:11:16 -0800
Anton Treuenfels wrote:
I have a numeric expression parser that allows literal strings to be used in
logical expressions (such as comparisons) because the results of those are
numeric. I gave the relevant string operators a very high precedence because
that seemed the easiest way to prevent numeric operators from engaging
string operands.
So the expression
"ABC" < "DEF" + 1
is parsed as
("ABC" < "DEF") + 1
and yields the value 2.
why does boolean + numeric -> numeric.
boolean + numeric could go to boolean or be disallowed IMO.
Or is the current semantic particularly useful and if so where?
regards
Andy Little
.
- Follow-Ups:
- Re: String concatenation design
- From: Barry
- Re: String concatenation design
- References:
- String concatenation design
- From: Anton Treuenfels
- String concatenation design
- Prev by Date: Re: double indirect block+inode
- Next by Date: Re: Transfer data between processes
- Previous by thread: Re: String concatenation design
- Next by thread: Re: String concatenation design
- Index(es):
Relevant Pages
|