0

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?

Himanshu
  • 2,384
  • 2
  • 24
  • 42
  • I get a different error message. Nevertheless, a variable name begins with a capital letter, for example, "Two_10". I suppose you want "two_10" to be a variable. – beroal Jul 12 '17 at 05:53
  • @beroal it worked. Please make that an answer. Thanks! – Himanshu Jul 13 '17 at 01:31

1 Answers1

1

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.

francoisr
  • 4,407
  • 1
  • 28
  • 48