Contents
Syntax
The syntax for
const type definitions type{const}(definitions) :={const}(type, definitions)
@const type definitions @type{const}(definitions) @:={const}(type, definitions)
Note: If you are using the first syntax for constant variable definitions and want to have more code and/or text following on the same line then simply end the definition with '
Description
The
Note: If you need to define thousands of variables then
Note:
@:={const}(int, x=10)!
Options
The following options are available for
option | description |
---|---|
do not register variable with |
|
define variable at layer |
|
definition of a |
|
add |
|
option | description |
f++ example
Examples of
const int a=10, b=12; const double d=3.14 string{const}(str="hello, world!") :=(ofstream, ofs("output.txt")) write(ofs, a, " ", b, " ", d, endl) write(ofs, str, endl) ofs.close()
n++ example
Examples of
@const int a=10, b=12; @const double d=3.14 @string{const}(str="hello, world!") @:=(ofstream, ofs("output.txt")) @write(ofs, a, " ", b, " ", d, endl) @write(ofs, str, endl) @ofs.close()