Contents
Syntax
The syntax for
private type definitions type{private}(definitions) :={private}(type, definitions)
@private type definitions @type{private}(definitions) @:={private}(type, definitions)
Note: If you are using the first syntax for private 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:
@:={private}(int, x=10)!
Options
The following options are available for
option | description |
---|---|
definition of a |
|
do not register variable with |
|
define variable at layer |
|
add |
|
option | description |
f++ example
Examples of
private int a=10, b=12; private double d=3.14 string{private}(str="hello, world!") :=(ofstream, ofs("output.txt")) write(ofs, a, " ", b, " ", d, endl) write(ofs, str, endl) ofs.close()
n++ example
Examples of
@private int a=10, b=12; @private double d=3.14 @string{private}(str="hello, world!") @:=(ofstream, ofs("output.txt")) @write(ofs, a, " ", b, " ", d, endl) @write(ofs, str, endl) @ofs.close()