Re: Why multiplication not allowed?
From: August Derleth (email_at_for.address)
Date: 01/07/04
- Next message: lallous: "Re: HTTP basic authentication"
- Previous message: Lew Pitcher: "Re: Why multiplication not allowed?"
- In reply to: Joona I Palaste: "Re: Why multiplication not allowed?"
- Next in thread: Keith Thompson: "Re: Why multiplication not allowed?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 07 Jan 2004 07:37:39 -0700
Joona I Palaste wrote:
> Sean Kenwrick <skenwrick@hotmail.com> scribbled the following:
>
>>But I think the reason I didn't get the job was because one of the other
>>questions the interviewer asked me was to tell him what was wrong with the
>>following statement:
>
>
>>i=+i;
>
>
>>I said that there was nothing wrong with it, but the interviewer claimed
>>that it was an ambiguous statement because it could mean adding i to itselt
>>or setting i to +i. I got into an argument with him saying that he must
>>be confused with i+=i; but he was adament he was right and got annoyed that
>>I was disagreeing wih him.
>
>
>>Afterwards I wondered whether this might have been some kind of syntax left
>>over from a very early incarnation of C which was subsequently dropped.
>>Perhaps the members of this group could enlighten me about this since I
>>think that this guy was just a complete idiot.
>
>
> Yes, this is an obsolete feature of C. =+ and =- originally meant the
> same as += and -=.
And =* meant the same as *=, which made expressions like
x=*p;
needlessly ambiguous. splint, the lint-like program I use for laughs,
still complains about things stemming from that wart.
> Whoever designed them that way must have been
> drinking something really strong.
Indeed.
- Next message: lallous: "Re: HTTP basic authentication"
- Previous message: Lew Pitcher: "Re: Why multiplication not allowed?"
- In reply to: Joona I Palaste: "Re: Why multiplication not allowed?"
- Next in thread: Keith Thompson: "Re: Why multiplication not allowed?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|