Last change
on this file since 25584 was 25584, checked in by davidb, 12 years ago |
Initial cut an a text edit area for GLI that supports color syntax highlighting
|
File size:
387 bytes
|
Line | |
---|
1 |
|
---|
2 | // example program for interpreter testing
|
---|
3 | // contains division and modulo functins
|
---|
4 |
|
---|
5 | input a,b
|
---|
6 | functions div(x,y) = if x < y
|
---|
7 | then 0
|
---|
8 | else div(x-y,y)+1
|
---|
9 | fi,
|
---|
10 | mod(x,y) = if x < y
|
---|
11 | then x
|
---|
12 | else mod(x-y,y)
|
---|
13 | fi
|
---|
14 | output div(a,b), mod(a,b)
|
---|
15 | arguments 324, 17
|
---|
16 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.