diff options
author | andreas <andreas@FreeBSD.org> | 1998-04-29 21:53:01 +0000 |
---|---|---|
committer | andreas <andreas@FreeBSD.org> | 1998-04-29 21:53:01 +0000 |
commit | 0ec6169bea8adb8ddbf8f9ce363f6e1803f88621 (patch) | |
tree | 1529c15b522fa7bd199b5491bc88817aefc9b779 /contrib/bc/Test/aryprm.b | |
download | FreeBSD-src-0ec6169bea8adb8ddbf8f9ce363f6e1803f88621.zip FreeBSD-src-0ec6169bea8adb8ddbf8f9ce363f6e1803f88621.tar.gz |
Import GNU bc 1.04
PR: 4183
Diffstat (limited to 'contrib/bc/Test/aryprm.b')
-rw-r--r-- | contrib/bc/Test/aryprm.b | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/bc/Test/aryprm.b b/contrib/bc/Test/aryprm.b new file mode 100644 index 0000000..9d3f95b --- /dev/null +++ b/contrib/bc/Test/aryprm.b @@ -0,0 +1,16 @@ +define p ( x[] ) { + auto i; + for (i=0; i<10; i++) x[i]; +} + +define m ( x[] ) { + auto i; + for (i=0; i<10; i++) x[i] *= 2; +} + +scale = 20; +for (i=0; i<10; i++) a[i] = sqrt(i); + +p(a[]); +m(a[]); +p(a[]); |