aboutsummaryrefslogtreecommitdiff
path: root/contrib/bc/tests/bc/scripts/globals.bc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bc/tests/bc/scripts/globals.bc')
-rwxr-xr-xcontrib/bc/tests/bc/scripts/globals.bc23
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/bc/tests/bc/scripts/globals.bc b/contrib/bc/tests/bc/scripts/globals.bc
new file mode 100755
index 000000000000..e9a0c6dbacd3
--- /dev/null
+++ b/contrib/bc/tests/bc/scripts/globals.bc
@@ -0,0 +1,23 @@
+#! /usr/bin/bc -gq
+
+define i(x) {
+ ibase=x
+ return ibase
+}
+
+define o(x) {
+ obase=x
+ return obase
+}
+
+define r(x) {
+ scale=x
+ return scale
+}
+
+i(11)
+ibase
+o(12)
+obase
+r(15)
+scale