057. Use .true. and .false. for Booleans, not 1 and 0#
topic: Data types
Note
This tip is a draft1.
Use .true. and .false. for Booleans and use the expression
merge(1,0,logical_variable)
if needed. Fortran standards have never specified an equivalence between integers and Booleans.
Use .true. and .false. for Booleans and use the expression
— FortranTip (@fortrantip) December 28, 2021
merge(1,0,logical_variable)
if needed. Fortran standards have never specified an equivalence between integers and Booleans. https://t.co/V1ZfGdxAWT
- 1
From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.