Errors, bugs, questions - page 2117

 

There was unambiguity there.

 
fxsaber:

There was unambiguity there.

What is single-valuedness if the order in which the operands are calculated is undefined?

 
A100:

What is unambiguity if the order in which the operands are calculated is undefined?

When it is undefined, I don't use it. But when it is defined, I do.

Dables add from left to right. Nothing will change here.
 
fxsaber:

When it is undefined, I don't use it. When it is certain, I use it.

Undefined in the sense that it is not documented and can be changed at any time. And if it were documented, it would not be a problem to change the documentation

 
A100:

Undefined in the sense that it is not documented and could be changed at any time. And if it were documented, they would change the documentation

fxsaber:

The dubs fold from left to right. Nothing will be changed here.

 
A100:

3. I was suggesting that the compiler should not be allowed to change the order in which the arguments for non-inline functions are calculated

5. The order of calculation is defined by the implementation (compiler) and it is quite specific (either right to left or left to right), and here for example:

it's not clear which order is 2-1-3 or 2-3-1 or whatever.

Result: 5041:0:5041.

Expected: 0:0:5041 from left to right or

5041:0:0 from right to left

It is specific to a particular situation. You can't expect it to always be like this, because the standard doesn't guarantee it.

It can easily change if the compiler suddenly decides to make your function inline, or you change the calling convention, or for other reasons.

 
how can we use
ObjectsTotal(OBJ_BUTTON)

For example, if during a search we need to select an object by name

 k=ObjectsTotal(OBJ_BUTTON);
   for(i=0; i<k; i++)
     {

      if(StringFind(ObjectName(i),Name+"LINEORDER"))
}

but in the list of all objects it is not under number 0,1,2,3 but under number 0,10,38,45.....

?

 
 
Hello. What ea you mean?
 
Reason: