Re: printing logical variables as "true" and "false"
- From: *** Hendrickson <***.hendrickson@xxxxxxx>
- Date: Mon, 28 Nov 2005 20:58:15 GMT
Richard E Maine wrote:
<beliavsky@xxxxxxx> wrote:
I would like to print logical variables as "true" and "false" rather than just "T" and "F", which is what Fortran WRITE statements do. I can define functions that convert .true. and .false. to the strings "true" and "false", but is there some edit descriptor I have overlooked?
Nope. I don't know of a language-provided shortcut for this. Your function is a pretty simple one to write, but I don't know a way to avoid it.
I think the function has already been written.
print *, merge("true", "false", logical_thingo)unless I've missed something.
*** Hendrickson
.
- Follow-Ups:
- Re: printing logical variables as "true" and "false"
- From: Richard E Maine
- Re: printing logical variables as "true" and "false"
- From: *** Hendrickson
- Re: printing logical variables as "true" and "false"
- References:
- printing logical variables as "true" and "false"
- From: beliavsky
- Re: printing logical variables as "true" and "false"
- From: Richard E Maine
- printing logical variables as "true" and "false"
- Prev by Date: Re: printing logical variables as "true" and "false"
- Next by Date: Re: printing logical variables as "true" and "false"
- Previous by thread: Re: printing logical variables as "true" and "false"
- Next by thread: Re: printing logical variables as "true" and "false"
- Index(es):