Test-delete.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Application
25 
26 Description
27 
28 \*---------------------------------------------------------------------------*/
29 
30 #include "string.H"
31 #include "IOstreams.H"
32 
33 using namespace Foam;
34 
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 // Main program:
37 
38 int main()
39 {
40  string a("a"), b("b"), c("c"), d("d"), e("e"),
41  f("f"), g("g"), h("h"), i("i"), j("j");
42 
43  Info<< "1) a = b + c + d + e + f + g;\n";
44  a = b + c + d + e + f + g;
45  Info<< a << endl;
46 
47  {
48  Info<< "2) a = e + f + g;\n";
49  a = e + f + g;
50  Info<< a << endl;
51  }
52 
53  Info<< "3) a = h + i + j;\n";
54  a = h + i + j;
55  Info<< a << endl;
56 
57  Info<< "end" << endl;
58 
59  return 0;
60 }
61 
62 
63 // ************************************************************************* //
IOstreams.H
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
string.H
g
const dimensionedVector & g
Definition: setRegionFluidFields.H:33
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:28
Foam::constant::universal::h
const dimensionedScalar h
Planck constant.
Definition: createFields.H:6
main
int main()
Definition: Test-delete.C:35
Foam::Info
messageStream Info
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::e
const double e
Elementary charge.
Definition: doubleFloat.H:94
f
labelList f(nPoints)
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.