Re: Input-line reverser



Mike Wahler said:

>
> "Mark McIntyre" <markmcintyre@xxxxxxxxxxx> wrote in message
> news:g5ibr111ajddk27gbggg7u93fhum2pegh1@xxxxxxxxxx
>> On Fri, 30 Dec 2005 15:26:25 GMT, in comp.lang.c , "Mike Wahler"
>> <mkwahler@xxxxxxxxxxxx> wrote:
>>
>>>
>>>"Richard Heathfield" <invalid@xxxxxxxxxxxxxxx> wrote in message
>>>
>>>> The reason it's not a valid C program is that it attempts to modify
>>>
>>>evaluate, not modify. Modifying (i.e. assigning to it) would be OK
>>
>> Not all modification is assignment. Consider if the modification were
>> for example ++ or +=.
>
> Both those operators evaluate their operands.

Indeed, and I did in fact say that "it attempts to modify the
value of an object, when that object hasn't been given a value yet". I'm
still trying to work out what you find objectionable about that.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • Re: improving my code: array of references
    ... modify_variable() doesn't appear to modify anything, ... are you assigning its return value to the scalar passed as a parameter? ... Yes and in your example 1 above you are passing around lots of data twice. ... modify_variablesub to work with references. ...
    (perl.beginners)
  • Re: Input-line reverser
    ... Mike Wahler said: ... >> The reason it's not a valid C program is that it attempts to modify ... > evaluate, not modify. ... Prev by Date: ...
    (comp.lang.c)
  • Re: Newbie char* question
    ... loses const" warning or some such, since you're assigning from a ... Here, however, you're actually trying to modify that constant value, which ...
    (comp.lang.cpp)
  • Re: Input-line reverser
    ... >>> The reason it's not a valid C program is that it attempts to modify ... >>evaluate, not modify. ... Modifying (i.e. assigning to it) would be OK ... Prev by Date: ...
    (comp.lang.c)
  • Re: Input-line reverser
    ... >> The reason it's not a valid C program is that it attempts to modify ... >evaluate, not modify. ... Modifying (i.e. assigning to it) would be OK ... Prev by Date: ...
    (comp.lang.c)