root/NEWT0/trunk/sample/fib.newt

Revision 75, 141 bytes (checked in by matthiasm, 22 months ago)

Using numeric magic pointer when communication with a real Newton.

Line 
1#!newt
2
3
4func fib(n)
5begin
6    if 2 < n then
7        return fib(n - 1) + fib(n - 2);
8
9    return n;
10end;
11
12
13for i := 0 to 21 do print(fib(i));
14
15
16fib(21);
Note: See TracBrowser for help on using the browser.