J3/04-116 Date: 09 Dec. 2003 To: J3 From: Dan Nagle Subject: IS_PRINTABLE Processors may prohibit some characters from appearing in formatted records or formatted streams. How is the user to know which characters? Number: Title: IS_PRINTABLE Submitted By: J3 Status: For Consideration References: Section 9.1.1 & 9.2.2.3(7) Basic Functionality: IS_PRINTABLE returns true if its character argument may be written to a formatted record or stream. Rationale: Processors may prohibit some control characters from appearing in formatted records or streams, but which characters? Surely, we want a program to be able to detect this processor-dependent set of prohibited characters, and take whatever remedial action (substitute ^char, etc.) it deems appropriate. The processor-dependency argues for inclusion in ISO_FORTRAN_ENV. Estimated Impact: Support libraries know which characters they won't accept. They may simple return true if the character argument may be printed, and false otherwise. Note that, with the possibility of multiple character sets, this is no longer an issue of "below blank won't print", it's more complex. Also, different processors may have different ideas of which characters will interfere with the O/S record conventions. Perhaps there ought to be some scheme for distinguishing formatted records from formatted streams, but that seems minor enough to be treated when edits are proposed. Detailed Specification: Add a new intrinsic to ISO_FORTRAN_ENV: IS_PRINTABLE ( char ) Argument is any kind of character*1. Return is true if the character may be written to a formatted record or stream, and false otherwise. Another possibility is to allow multicharacter strings, and return 0 for "all OK" and an index to the first troublesome character if one is encountered. History: