pro print_text,text,device
;
;+
; NAME:
; 	PRINT_TEXT	
; PURPOSE:
;	Print Text Section from SXT Generic Files
;	Recursively Parses for line break characters 
; CALLING SEQUENCE:
;	PRINT_TEXT, text [,device]
;		data structure
; INPUTS:
;	TEXT - string, generally extracted from SXT generic file
;	DEVICE - [Optional], Logical unit for output
; COMMON BLOCKS;
;	NONE
; MODIFICATION HISTORY:
;	Version 0 - SLF, 3/15/91
;-
;
;
if n_params() eq 1 then device = -1			; terminal 
;
delimit = strpos(text,'\\')				; delimiter
if delimit ne -1 then begin				; line break 
   ; line break was found, print and recurse
   printf,device,strtrim(strmid(text,0,delimit),2)	; print line
   print_text,strmid(text,delimit+2,strlen(text)), $	; recurse till
      device
endif else $
   printf,device,strtrim(text,2)			; print rest
;
return
end 
