SET PCOL example
The following example writes "Jack & Jill" to the printer. It uses PCOL( ) to note the column position three times, at the beginning, after "Jack", and after "Jill":
set talk off
set printer on
// now ?s are directed to printer
? // printer at col 0 of next line
beginpos=pcol( ) // note the current column
?? "Jack"
lastjackpos=pcol( )
?? " & Jill"
lastjillpos=pcol( )
// prints:
// Jack & Jill
set printer off
close printer
? beginpos // 0.00
? lastjackpos // 4.00
? lastjillpos // 11.00
// Displays column positions for reference