Hi Bob,
You've got the args backwards:
print pos(flag$,str$(k))
will return 3.
I get these backwards half the time myself and have to double check the manual, which probably could have been written with better explanations than it has.
The others: cpos, posr, cposr ncposr, etc are confusing as well.
Regards,
MCC