003 File Manager
Current Path:
/usr/src/contrib/bc/tests/bc/scripts
usr
/
src
/
contrib
/
bc
/
tests
/
bc
/
scripts
/
📁
..
📄
add.bc
(228 B)
📄
all.txt
(149 B)
📄
array.bc
(554 B)
📄
array.txt
(1.33 KB)
📄
atan.bc
(134 B)
📄
atan.txt
(2.34 KB)
📄
bessel.bc
(700 B)
📄
divide.bc
(298 B)
📄
functions.bc
(42 B)
📄
functions.txt
(26 B)
📄
globals.bc
(176 B)
📄
globals.txt
(18 B)
📄
len.bc
(623 B)
📄
len.txt
(6 B)
📄
multiply.bc
(285 B)
📄
parse.bc
(314 B)
📄
print.bc
(397 B)
📄
rand.bc
(852 B)
📄
rand.txt
(462 B)
📄
references.bc
(4.73 KB)
📄
references.txt
(3.33 KB)
📄
screen.bc
(247 B)
📄
screen.txt
(4 B)
📄
subtract.bc
(228 B)
Editing: array.bc
#! /usr/bin/bc -q define z(a[]) { for (i = 0; i < l; ++i) { a[i] } } define x(a[]) { # Test for separate vars and arrays. auto a for (a = 0; a < l; ++a) { a[a] = -a } z(a[]) } define g(x[], y[]) { return x[0] - y[0] } define h(y[], x[]) { return g(x[], y[]) } define m(*x[], *y[]) { return x[0] / y[0] } define n(*y[], *x[]) { return m(x[], y[]) } for (i = 0; i < 101; ++i) { a[i] = i } a[104] = 204 l = length(a[]) for (i = 0; i <= l; ++i) { a[i] } z(a[]) x(a[]) z(a[]) l x[0] = 5 y[0] = 4 h(x[], y[]) n(x[], y[]) halt
Upload File
Create Folder