[UP]


Manual Reference Pages  - bytes_to_anything (3)

NAME

bytes_to_anything(3f) - [M_anything] 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) October 17, 2020
Generated by manServer 1.08 from e9dcb475-ce10-43cd-9f6d-72a6bf9a7dbf using man macros.