[UP]


Manual Reference Pages  - uc (3)

NAME

uc(3f) - [M_strings:NONALPHA] uc C-like escape sequences (LICENSE:PD)

CONTENTS

Synopsis
Description
Examples
Author
License

SYNOPSIS

function uc(line,escape) result(lineout)

   integer, parameter                           :: u = selected_char_kind(’ISO_10646’)
   integer, parameter                           :: a = selected_char_kind(’ASCII’)
   character(len=:,kind=u),allocatable          :: lineout

character(len=*,kind=u) :: line character(len=1,kind=u),intent(in),optional :: escape

DESCRIPTION

uc() ucs sequences used to represent commonly used escape sequences or control characters. By default ...

Escape sequences

\ backslash
a alert (BEL) -- g is an alias for a
b backspace
c suppress further output
e escape
f form feed
n new line
r carriage return
t horizontal tab
v vertical tab
oNNN byte with octal value NNN (3 digits)
dNNN byte with decimal value NNN (3 digits)
xHH byte with hexadecimal value HH (2 digits) -- h is an alias for x
uHHHH Unicode value

The default escape character is the backslash, but this may be changed using the optional parameter ESCAPE.

EXAMPLES

Sample Program:

   program demo_uc
   ! run in a terminal with Unicode support, like xterm or sakura.
   use, intrinsic :: iso_fortran_env, only : output_unit
   use M_strings,                     only : uc
   implicit none
   integer, parameter                    :: u = selected_char_kind(’ISO_10646’)
   character(kind=u, len=:), allocatable :: string
      open (output_unit, encoding=’utf-8’)
      string = uc(u_’unicode character: \u263B and \u263b’)
      print ’(a)’, string
   end program demo_uc

AUTHOR

John S. Urban

LICENSE

Public Domain


uc (3) October 17, 2020
Generated by manServer 1.08 from 8bbd2e37-e389-454d-86df-6a50d7b95951 using man macros.