Saturday 15 June 2013

expression - Bracket evaluation -


Who should first evaluate X = 1 or X = 2?

In this case: Y = (X * (x = 1)) / (x + (x = 2))

And in this case: Y = (6 + ( X- (x = 1)) / (4+ (9- (x * (x = 2))))

... For example.

I have some time At first there was a very strange estimate on an expression evaluator. For bracket evaluation from simple left to right priority (obviously there is already depth for each bracket set), but the bracket set should be evaluated, The first puzzle should be evaluated Whether the deepest set is to be in the past with L or L?

This is your choice. This Wikipedia article From "":

  Many programming languages, however, some such, such as APL and SmallTalk, have no operator preference rules (APL is strictly in the evaluation, in smalltalk it is strictly from left to right. Is) use the priority level which is usually followed by the order used in mathematics Are.    

No comments:

Post a Comment