bytes_to_anything(3f) - [M_anything] convert bytes(character)len=1):: array(:)) to standard types (LICENSE:PD)
Synopsis
Description
Options
Return
Example
Author
License
subroutine bytes_to_anything(chars,anything)
character(len=1),allocatable :: chars(:) class(*) :: anything
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, ...
CHARS The input value is an array of bytes (character(len=1)).
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=*)
Sample program
Expected output
John S. Urban
Public Domain
bytes_to_anything (3) | October 17, 2020 |