Strange ???

Note:

"It means, that each subexpression is always evaluated in

the same way with no dependency on it's entrance into the whole expression."

CURRENT VERSION of Calculator:

Input:

(0)

(0)1

(0)1(0)1

(0)1(0)1(0)

(0)1(0)1(0)1

(0)1(0)1(0)1(0)

Output:

Expression 1 evaluates to: 0

Expression 2 evaluates to: 1

Expression 3 evaluates to: 101

Expression 4 evaluates to: 1010

Expression 5 evaluates to: 10101

Expression 6 evaluates to: 101010

comment : "Leading zeroes excluded"

PREVIOUS VERSION of Calculator:

Input:

(0)

(0)1

(0)1(0)1

(0)1(0)1(0)

(0)1(0)1(0)1

(0)1(0)1(0)1(0)

Output:

Expression 1 evaluates to: 0

Expression 2 evaluates to: 1

Expression 3 evaluates to: 11

Expression 4 evaluates to: 110

Expression 5 evaluates to: 111

Expression 6 evaluates to: 1110

According to the output of the CURRENT VERSION of calculator

!!! evaluation of subexpression depends on context

Am I right ???

Re: Strange ???

The so called CURRENT VERSION of calculator works correctly (where do you see dependency on context? just notice that calculator operates on numbers, not on strings!)

In fact, calculator engine was updated a few days ago. An error was found there. :) That error was concerned with dependency on context (previous version, as it is mentioned above, evaluated 1(0)1 as 11 instead of 101) and it was fixed. Current logic of calculator is more predictable than the previous one.

"An error was found..." I like it :) (+)

If I'm not mistaken last time you've said such output was absolutely correct and advised me to learn calculator logic carefully ;)

Re: Strange ???

Sorry !!!

I made a foolish mistake !!!

Re: Strange ???

Thanks for the help !!!