Short-circuit evaluation: Difference between revisions

m
It should always be a(i), whoops!
m (→‎{{header|Oz}}: Improved output.)
m (It should always be a(i), whoops!)
Line 15:
The task is to create two functions named a and b, that take and return the same boolean value. The functions should also print their name whenever they are called. calculate and assign the values of the following equations to a variable in such a way that function b is only called when necessary:
x = a(i) and b(j)
y = a(ji) or b(j)
If the language does not have short-circuit evaluation, this might be achieved with nested if statements.
 
Anonymous user