RE: [sv-bc] Function call without parenthesis

From: Rich, Dave <Dave_Rich_at_.....>
Date: Wed Dec 14 2005 - 15:26:43 PST
You see neither
 
What you get is
 
zeroth : 0
first : 1
second : 2
third : 3
penultimate :4 
last : 5
antelast : 6

The language can't prevent stupid people from doing stupid things.

You could alsw write:

typedef enum {five=0, three=1, six=2} float;

float o;

...

And confuse the heck out of people

What's your point.? (You don't have to answer that :))

Dave@PDX

 

 

 



________________________________

From: owner-sv-bc@eda.org on behalf of Michael (Mac) McNamara
Sent: Wed 12/14/2005 2:59 PM
To: Brad Pierce; sv-bc@eda.org
Subject: RE: [sv-bc] Function call without parenthesis



OK, how about


typedef enum { zeroth, first, second, third, penultimate, last, antelast
} Ordinals;
Ordinals o = o.first;
forever begin
   $display( "%s : %d\n", o.name, o );
   if( o == o.last ) break;
   o = o.next;
end


Do we see:

zeroth
first
second
third
penultimate
last
antelast

or

first
second
third
penultimate
last

???

Michael McNamara
mcnamara@cadence.com
408-914-6808 work
408-348-7025 cell


-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Brad
Pierce
Sent: Wednesday, December 14, 2005 12:19 PM
To: sv-bc@eda.org
Subject: Re: [sv-bc] Function call without parenthesis

Neither of these are even legal syntax, because "trial" is a type
identifier.  If you want usages like that, we'd need to start allowing
the :: operator on types, as suggested in

  http://www.eda.org/sv-bc/hm/3310.html

and recorded in

  http://eda.org/svdb/bug_view_page.php?bug_id=948

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Greg
Jaxon
Sent: Wednesday, December 14, 2005 11:28 AM
To: sv-bc@eda.org
Subject: Re: [sv-bc] Function call without parenthesis

More to the point would be this example:

    typedef enum {
       original=0,
       first=1,
       second,
       third,
       penultimate,
       last,
       out_of_bounds
    } trial;

Is trial.first  equal to 0 or 1?  How about trial.first()?

Greg Jaxon
Received on Wed Dec 14 15:26:50 2005

This archive was generated by hypermail 2.1.8 : Wed Dec 14 2005 - 15:27:14 PST