NO

Author Topic: priority of operations  (Read 13391 times)

vedro-compota

  • Guest
Re: priority of operations
« Reply #15 on: May 28, 2012, 04:06:35 PM »
Ah ... I understand you completely. "priority" does not relevant to the problem -  as it had been said ... - as frankie said  =
Quote
This is not a problem of priorities

CommonTater

  • Guest
Re: priority of operations
« Reply #16 on: May 28, 2012, 04:32:47 PM »
[CommonTater , I  got this problem from practise had quickly solved it by replacing 
Code: [Select]
str++; next= str; by
Code: [Select]
next= str++and only after that I asked why
Code: [Select]
next= str++ "doesn't work" ))

More exactly ... it did work, it just didn't do what you expected.
 
 

vedro-compota

  • Guest
Re: priority of operations
« Reply #17 on: May 28, 2012, 04:52:33 PM »
one more my mistake (due to carelessness - during post typing).... -
replacing
Code: [Select]
next= str++by
Code: [Select]
str++; next= str; // actually i needed firstly incremented str
« Last Edit: May 28, 2012, 04:54:28 PM by vedro-compota »

CommonTater

  • Guest
Re: priority of operations
« Reply #18 on: May 28, 2012, 04:53:55 PM »
one more my mistake.... -
replacing
Code: [Select]

str++; next= str;
next= str++
by
str++; next= str; // actually i needed firstly incremented


Then you could have used....
Code: [Select]
next  = ++str;   


vedro-compota

  • Guest
Re: priority of operations
« Reply #19 on: May 28, 2012, 04:56:26 PM »
one more my mistake (due to carelessness - during post typing).... -
replacing
Code: [Select]
next= str++by
Code: [Select]
str++; next= str; // actually i needed firstly incremented str
yes - next  = ++str;  is alternative)
I've understand this  from your first answer in this thread))