-# $OpenBSD: Makefile,v 1.8 2020/12/16 18:44:55 bluhm Exp $
+# $OpenBSD: Makefile,v 1.9 2021/04/21 10:30:46 mpi Exp $
BTRACE?= /usr/sbin/btrace
# scripts that don't need /dev/dt
BT_LANG_SCRIPTS= arithm beginend boolean comments delete exit map \
- map-unnamed maxoperand min+max+sum multismts nsecs+var
+ map-unnamed maxoperand min+max+sum multismts nsecs+var \
+ print
BT_KERN_SCRIPTS=
{
printf("a - b = %d\n", @a - @b);
- @c = @a + 2 * @b;
- printf("c = %d, total = %d\n", @c, (@c - @b) / 5);
+ $c = @a + 2 * @b;
+ printf("c = %d, total = %d\n", $c, ($c - @b) / 5);
}
BEGIN
{
- @a = 9;
+ @a = 8;
@b = 1;
printf("a & b = %d\n", @a & @b);
printf("a | b = %d\n", @a | @b);
}
+
+END
+{
+ printf("a && b = %d\n", @a && @b);
+ printf("a || b = %d\n", @a || @b);
+}
-a & b = 1
+a & b = 0
a | b = 9
+a && b = 1
+a || b = 1
--- /dev/null
+BEGIN {
+ $str = "string";
+
+ print(890);
+ print($str);
+ print(comm);
+}
--- /dev/null
+890
+string
+btrace