NO

Author Topic: priority of operations  (Read 8572 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))