mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: consistency improvements for keyType and wordRe
- simplify compile/uncompile, reading, assignment - implicit construct wordRe from keyType (was explicit) to simplify future API changes. - make Foam::isspace consistent with std::isspace (C-locale) by including vertical tab and form feed ENH: improve #ifeq float/label comparisons
This commit is contained in:
committed by
Andrew Heather
parent
57c1fceabf
commit
96a1b86fb9
31
tutorials/IO/dictionary/good-if3.dict
Normal file
31
tutorials/IO/dictionary/good-if3.dict
Normal file
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object dictionary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// (label == scalar) ?
|
||||
#ifeq 0 0.0
|
||||
labelEqScalar true;
|
||||
#else
|
||||
labelEqScalar false; } // Provoke parse error if we see this branch
|
||||
#endif
|
||||
|
||||
// (scalar == label) ?
|
||||
#ifeq 0.0 0
|
||||
scalarEqLabel true;
|
||||
#else
|
||||
scalarEqLabel false; } // Provoke parse error if we see this branch
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
Reference in New Issue
Block a user