' Collection of code snippets by Arne Vajhøj 
' (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
program p5

declare string msg

! open mailboxes
open "C2SMBX:" for output as file #1
open "S2CMBX:" for input as file #2
! write
print #1, "Hi from Basic!"
! read
while 1 = 1
    input #2, msg
    if msg = "*" then
        goto done
    else
        print "|" + msg + "|"
    end if
next
done:
! close mailboxes
close #2
close #1

end program
