[UP]


Manual Reference Pages  - esc_mode (3)

NAME

esc_mode(3f) - [M_escape] select processing mode for output from esc(3f)

CONTENTS

Synopsis
Description
Options
Example

SYNOPSIS

subroutine esc_mode(manner)

      character(len=*),intent(in) :: manner

DESCRIPTION

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.

OPTIONS

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).

EXAMPLE

Sample program

   program demo_esc_mode
   use M_escape, only : esc, esc_mode
   implicit none
   character(len=1024) :: line
   real :: value

value=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
Generated by manServer 1.08 from 69572eda-f20e-429d-9c04-d7218c0ca7f6 using man macros.