Print(i++,i++,i++,i++)

To add comments, please log in or register
Laszlo Tormasi
5284
Laszlo Tormasi  
The above code prints 3210. Is the order somewhere documented? Is it always right to left? 
William Roeder
22339
William Roeder  
  1. Never, ever, do that. The results are always undocumented and can vary from language to language and from compiler version to version.

  2. Perhaps you should read the manual:

    Important Notice int i=5; int k = i++ + ++i; Computational problems may occur while moving the above expression from one programming environment to another one (for example, from Borland C++ to MQL4). In general, the order of computations depends on the compiler implementation. In practice, there are two ways to implement the post-decrement (post-increment):…
              Arithmetic Operations - Operations and Expressions - Language Basics - MQL4 Reference

    How To Ask Questions The Smart Way. 2004
         How To Interpret Answers.
              RTFM and STFW: How To Tell You've Seriously Screwed Up.

To add comments, please log in or register