' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
program dg

declare integer i

external sub test(integer)

for i = 0 to 15
    call test(i)
next i

end program
!
sub test(integer v)

map (xb) double x
map (xb) byte b(7)

external double function add(double, double)

b(0) = 0
b(1) = 64
b(2) = 0
b(3) = 0
b(4) = 0
b(5) = 0
b(6) = v
b(7) = 0
x = add(x, 0.0)
print v, "->", b(6)

end sub
!
function double add(double a, double b)

add = a + b

end function
