toplevel abstraction in line 1

122 Views Asked by At

I see the following error when running the program at the bottom:-

%***************************** failure **************************
%**
%** Tell: 1024 = two_10
%**
%** Call Stack:
%** toplevel abstraction in line 1, column 0, PC = 125792828
%**--------------------------------------------------------------

Mozart-oz program:-

declare
two_10 = 2*2*2*2*2*2*2*2*2*2

{Browse two_10*two_10}

What am I missing?

1

There are 1 best solutions below

0
On BEST ANSWER

In Oz, variables must be capitalised. Using Two_10 = 2*2*2*2*2*2*2*2*2*2 solves the problem.

You could also use {Number.pow 2 10} to compute 2 to the 10th power.