Changes

Jump to: navigation, search

GPU621/The Chapel Programming Language

139 bytes removed, 14:26, 20 November 2020
Variable:
==== Variable: ====
Variables are declared with the by '''var''' keyword. Variable declarations must have Declarations require a type, or initializer, or both.
var myVariable1myVar1: intreal;
We use '''const''' and '''param''' can be used to declare runtime constants and compile-time constants respectively. A We can set a '''const''' must be initialized in place, but can have its variable's value generated at runtime. A But '''param''' must be known variable requires to set it at compile timebeginning.
const myConst: real = sqrt(myVariable2myVar2);
param myParam = 3.14;
All three variable kinds We can be qualified by use the '''config''' keyword. This allows to override the initial value to be overridden on the command line.
config var myVariable2myVar2: bool = false; //./variable --myVariable=true
==== Procedures: ====
25
edits

Navigation menu