esc_mode(3f) - [M_escape] select processing mode for output from esc(3f)
Synopsis
Description
Options
Example
subroutine esc_mode(manner)
character(len=*),intent(in) :: manner
Turn off the generation of strings associated with the XML keywords in the string generated by the esc(3f) function, or display the text in raw mode as it was passed to esc(3f) or return to ANSI escape control sequence generation.
MANNER The current manners or modes supported via the ESC_MODE(3f) procedure are
plain suppress the output associated with keywords color(default) commonly supported escape sequences raw echo the input to ESC(3f) as its output reload restore original keyword meanings deleted or replaced by calls to update(3f).
Sample program
program demo_esc_mode use M_escape, only : esc, esc_mode implicit none character(len=1024) :: line real :: valuevalue=3.4567 if( (value>0.0) .and. (value<100.0))then write(line,fmt=("& &<w><G>GREAT</G></w>: The value <Y><b>",f8.4,"</b></Y> is in range & &"))value else write(line,fmt=("& &<R><e>ERROR</e></R>:The new value <Y><b>",g0,"</b></Y> is out of range& & "))value endif
write(*,(a))esc(trim(line))
call esc_mode(manner=plain) ! write as plain text write(*,(a))esc(trim(line)) call esc_mode(manner=raw) ! write as-is write(*,(a))esc(trim(line)) call esc_mode(manner=ansi) ! return to default mode write(*,(a))esc(trim(line))
end program demo_esc_mode
esc_mode (3) | March 11, 2021 |