Home | Notes | Languages | Programs | Homework |
Re: Whitespace |
Stephen Edwards (edwards@CS.VT.EDU)
Thu, 20 Sep 2001 10:27:23 -0400
Message-ID: <3BA9FCCB.3771301D@cs.vt.edu> Date: Thu, 20 Sep 2001 10:27:23 -0400 From: Stephen Edwards <edwards@CS.VT.EDU> Subject: Re: Whitespace
Justin wrote:
> Wondering if this is an error.. Says in spec that whitespace in an
> expression doesn't matter. So if we get a line of input like so:
> 1 2 + 3
The assignment says:
> White space may be used for clarity or to separate tokens in expressions,
> but no white space is required within an expression.
To clarify, white space *between* tokens is optional and should be
ignored, but no white space can ever occur *within* a single token.
Thus, digits separated by spaces should be interpreted as separate
numbers, not as parts of a single number.
-- Steve
-- Stephen Edwards 604 McBryde Hall Dept. of Computer Science e-mail : edwards@cs.vt.edu U.S. mail: Virginia Tech (VPI&SU) office phone: (540)-231-5723 Blacksburg, VA 24061-0106 -------------------------------------------------------------------------------
Home | Notes | Languages | Programs | Homework |