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

call test('0::"task=s0task"')
call test('0::"task=s1task"')
call test('0::"task=s2task"')
call test('0::"task=s3task"')
call test('0::"task=s4task"')
call test('0::"task=s5task"')
call test('0::"task=s6task"')
call test('0::"task=s7task"')
call test('0::"task=s8task"')

end program
!
sub test(string task)

declare string msg

! open task
open task for input as file #1
! read message from task
input #1, msg
! print
print "|" + msg + "|"
! close task
close #1

end sub
