[UP]


Manual Reference Pages  - bytes_to_anything (3)

NAME

bytes_to_anything(3f) - [M_sort] convert bytes(character)len=1):: array(:)) to standard types (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Return
Example
Author
License

SYNOPSIS

subroutine bytes_to_anything(chars,anything)

   character(len=1),allocatable :: chars(:)
   class(*) :: anything

DESCRIPTION

This function uses polymorphism to allow input arguments of different types. It is used to create other procedures that can take many argument types as input options and convert them to a single type to simplify storing arbitrary data, to simplify generating data hashes, ...

OPTIONS

CHARS The input value is an array of bytes (character(len=1)).

RETURN

ANYTHING
  May be of KIND INTEGER(kind=int8), INTEGER(kind=int16), INTEGER(kind=int32), INTEGER(kind=int64), REAL(kind=real32, REAL(kind=real64), REAL(kind=real128), complex, or CHARACTER(len=*)

EXAMPLE

Sample program

Expected output

AUTHOR

John S. Urban

LICENSE

Public Domain


bytes_to_anything (3) March 11, 2021
Generated by manServer 1.08 from cd7fd400-b27c-4394-9654-73ea53285b98 using man macros.