role of semicolon

Z

Zax

Keith Thompson said:
Zax said:
Keith Thompson said:
[...]
Please refrain from using poor English where I have to read it.
[...]

You've become boring. I don't use a killfile, but I will no longer
spend the considerable time and effort necessary to figure out what
you're talking about. If you post something topical and
understandable, I may respond. Otherwise, I give up on you.

Bye.

I disagree. Hello. Zax

Judging from the article headers, I believe that "Merrill & Michele"
and "Zax" are the same person.

"Merrill & Michele", or whoever you are, you have gone beyond being
boring and become an actively obnoxious troll. Actually, you've been
a troll for a while, but I've tried to give you the benefit of the
doubt. Though I still prefer not to use a killfile, if I reply to
another of your articles it will be either to correct misinformation
for the benefit of others or to warn people about your behavior.

Statement: K&R2 does not have ; in the index. MPJ
 
Z

Zax

Michael Mair said:
Zax said:
[...]

Please refrain from using poor English where I have to read it.

[...]

You've become boring. I don't use a killfile, but I will no longer
spend the considerable time and effort necessary to figure out what
you're talking about. If you post something topical and
understandable, I may respond. Otherwise, I give up on you.

Bye.

I disagree. Hello. Zax

Hello again MPJ,

and what exactly do you think to gain by this childish game?
Zax meets killfile.

Verloren.
 
L

Lawrence Kirby

On Mon, 20 Dec 2004 21:32:48 +0000, Keith Thompson wrote:

....
Since the token sequence
42
contains no operators or operands, it doesn't strictly satisfy the
definition of "expression", though it's clearly the intent that it is
one, at least if it appears in an expression context.

This was discussed at length in comp.std.c a while ago in the "Is 5 an
expression?" thread. I suggest reviewing that thread before posting
on the subject here; it's very likely that whatever point you want to
make has already been made.

That may be the point Dik was making, in which case I missed it. My
point, and what I thought Dik was referring to, was different but IMO more
relevant to the discussion about statements and compound statements.

Lawrence
 
M

Mike Wahler

Keith Thompson said:
Unfortunately, the standard's definition of "expression" is flawed.

C99 6.5p1 says:

An _expression_ is a sequence of operators and operands that
specifies computation of a value, or that designates an object or
a function, or that generates side effects, or that performs a
combination thereof.

Since the token sequence
42
contains no operators or operands,

Why is 42 not an operand?

-Mike
 
K

Keith Thompson

Mike Wahler said:
Why is 42 not an operand?

C99 6.4.6p2 (with underscores indicating italics, i.e., definitions):

A punctuator is a symbol that has independent syntactic and
semantic significance. Depending on context, it may specify an
operation to be performed (which in turn may yield a value or a
function designator, produce a side effect, or some combination
thereof) in which case it is known as an _operator_ (other forms
of operator also exist in some contexts). An _operand_ is an
entity on which an operator acts.

The "other forms of operator" include things like sizeof that aren't
puctuators. Since 42 is not acted on by an operator, it's not an
operand.

It could be argued that there's an implicit invisible unary operator,
but there's no support for this idea in the standard -- and if there
is such an operator, you could as easily argue that there are an
arbitrary, or even infinite, number of them.

Again, it's clearly intended that 5 is an expression; the problem is
with the wording of the definition, not with our understanding of what
an expression is. The issue is therefore more appropriate for
comp.std.c than for comp.lang.c. I'd redirect followups, but we
already discussed it there some months ago in the "Is 5 an expression?"
thread.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top