RE: [sv-bc] Question re. new ++ and -- operators

From: Mehdi Mohtashemi <Mehdi.Mohtashemi@synopsys.com>
Date: Sun Mar 21 2004 - 14:11:02 PST

Nikhil,
 I believe it is legal to use that form without the whitespaces.
   j = i+++(...) results in the same as j = i++ + (..)
 However you raise a good point, specially for readability
purposes to require white space.
- Mehdi

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of
Rishiyur S. Nikhil
Sent: Friday, March 19, 2004 2:32 PM
To: sv-bc@eda.org
Subject: [sv-bc] Question re. new ++ and -- operators

Can the new '++' and '--' operators be followed immediately by another
operator, without whitespace?

E.g., the example on page 65 (just before 7.4) is:

     j = i++ + (...)

Would it be legal to say this without the whitespaces?

     j = i+++(...)

Advantage of requiring whitespace: more readable, and allows future
addition of a '+++' operator without breaking existing code.

Nikhil
Received on Sun Mar 21 14:11:08 2004

This archive was generated by hypermail 2.1.8 : Sun Mar 21 2004 - 14:12:19 PST