*--Print condensed print and then print 10cpi to an Okidata ptrcond="27, 15" && condensed printing ptrstan="18" && 10 cpi printing ptrrest="27" && reset av_cond=ptr_code(ptrcond) av_stan=ptr_code(ptrstan) resetopt=ptr_code(ptrrest) port=GETPRINTER() && Choose an Okidata dot matrix set console OFF SET PRINTER TO NAME (port) set device to print set PRINTER on ??? av_cond ? "line 1 and this is a test in condensed print." ??? av_stan ??? resetopt ? "line 2 and this is a test in 10cpi" EJECT set PRINTER off set printer to SET DEVICE TO SCREEN set console on RETURN FUNCTION ptr_code PARAMETERS ptr_string PRIVATE pos,p_code pos = 0 && Position of comma xpos = 0 && Ending quote mark p_code = "" && Actual printer code *Start with p_code equal to the first number as a CHR() IF !EMPTY(ptr_string) p_code = CHR(VAL(ptr_string)) DO WHILE .T. pos = AT(",",ptr_string) IF pos = 0 EXIT ENDIF IF SUBSTR(ptr_string,pos+1,1) = '"' xpos = AT('"',ptr_string,2) p_code = p_code + SUBSTR(ptr_string,pos+2,xpos-(pos+2)) ptr_string = SUBSTR(ptr_string,xpos+1) ELSE ptr_string = SUBSTR(ptr_string,pos+1) p_code = p_code + CHR(VAL(ptr_string)) ENDIF ENDDO ENDIF RETURN p_code