pdec(3f) - [M_framework__msg] write out string with ASCII decimal equivalent vertically under it (LICENSE:PD)
Synopsis
Description
Examples
Author
License
Usage:
subroutine pdec(string) character(len=*),intent(in) :: string
Given a string to print, PDEC() writes out the ASCII Decimal equivalent of the string directly underneath it. This can help you to locate unprintable characters or non-standard white-space such as a backspace character or tab character in input strings that your program could not interpret. On output, non-printable characters are replaced with a space, and trailing spaces are ignored.
You read the numbers vertically.
1. ignore trailing spaces 2. print the character if it has an ADE of 32 on up 3. print a space if it has an ADE of less than 32 4. underneath each character print the ADE value vertically
Sample program:
program demo_pdec use M_framework__msg, only : pdec call pdec( ABCDEFG abcdefg ) end program demo_pdecwould produce (notice trailing space is trimmed):
> ABCDEFG abcdefg >0000000000001111 >3666667739990000 >2567890127890123
John S. Urban
Public Domain
Nemo Release 3.1 | pdec (3) | February 23, 2025 |