[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ProgSoc] probably a stupid question...



On  9 Feb, Vik wrote:
>> 
>> I disagree that the functions should generate the same code. The first
>> function will increment p everytime the test is performed, even when the
>> test fails (ie *p == '\0'). The second function should only incrememnt p
>> if the test passed. p will have a different value after execution of
>> these functions.
>> 
>> Someone correct me if I'm wrong.
> 
> That sounds correct. But the only difference between the two is the value
> of p at the end of the function, right? My problem was that the different
> functions were accessing different address spaces. 

Friend of mine pointed out that since one function points after the
null, it would normally either throw an exception or move on to the
next variable/whatever - is that your problem?

-- 
Nicholas

QUARK 1. n. The sound made by a well-bred duck.
 - http://www.bestiary.com/moose/humour/

--
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.

This list is archived at <http://www.progsoc.uts.edu.au/lists/progsoc/>