define fd
define buf
define testStr "Hello, world!"
define rlen len(testStr)

print "open for write"
fd = open("filetest.tmp","w");
#print "fd=" + fd
write(fd,testStr);
print "closing"
close(fd);

print "opening for reading"
fd = open("filetest.tmp","r");
#print "fd=" + fd
buf = read(fd,rlen);
print "closing"
close(fd);

print buf