diff options
Diffstat (limited to 'tests/bc/scripts')
| -rw-r--r-- | tests/bc/scripts/all.txt | 1 | ||||
| -rw-r--r-- | tests/bc/scripts/array2.bc | 20 | ||||
| -rw-r--r-- | tests/bc/scripts/array2.txt | 2 |
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/bc/scripts/all.txt b/tests/bc/scripts/all.txt index b4a178783796..e2d2aa320c6f 100644 --- a/tests/bc/scripts/all.txt +++ b/tests/bc/scripts/all.txt @@ -5,6 +5,7 @@ add.bc print.bc parse.bc array.bc +array2.bc atan.bc bessel.bc functions.bc diff --git a/tests/bc/scripts/array2.bc b/tests/bc/scripts/array2.bc new file mode 100644 index 000000000000..34d88c3e276b --- /dev/null +++ b/tests/bc/scripts/array2.bc @@ -0,0 +1,20 @@ +#! /usr/bin/bc -q + +define z(x, a[]) { + return x + a[1] +} + +define y(x, *b[]) { + return x + b[1] +} + +a[0] = 5 +a[1] = 6 + +b[0] = 8 +b[1] = 7 + +z(a[0], b[]) +y(b[0], a[]) + +halt diff --git a/tests/bc/scripts/array2.txt b/tests/bc/scripts/array2.txt new file mode 100644 index 000000000000..76dcb035f907 --- /dev/null +++ b/tests/bc/scripts/array2.txt @@ -0,0 +1,2 @@ +12 +14 |
