split vs conjoined operators

So I'm looking at what I *think* is a typo in my textbook and a half hour on Google can't give me a solid yes/no either way.

We're looking at operators that combination some arithmetic operation and set the assignment and using the same language to test boolean values. i.e. a = a + b :: a += b

My question is do compilers treat all spaces as delimiters and have a break or pause in the logic unit? I'm looking at as follows:

r > = 4;

Can the compiler discern we're meaning >= or are spaces in the middle of combo-operators allowed?

Can the compiler discern we're meaning >= or are spaces in the middle of combo-operators allowed?


If spaces are not allowed, your code is equivalent to: (r > =) 4; which won't compile.

If spaces are allowed, your code is equivalent to: (r >= 4); which will compile.

So, if it compiles, spaces are allowed and ff it doesn't, spaces are not. Have you tried to compile it?
Honestly, no. But it's one of 20 or so statements in the book we're supposed to say work or don't.
@keskiverto
Thank you! Never heard operators clled tokens, but it makes sense.
Topic archived. No new replies allowed.