Changes

Jump to: navigation, search

GPU621/The Chapel Programming Language

93 bytes removed, 14:50, 20 November 2020
Variable:
=== Language Basics ===
==== Variable: Keywords ====
Variable '''var''': variable declarations require , requires a type or initializer.
We declare variables using '''varconst''' keyword: runtime constants and compile-time constants. Must be initialized.
We can use '''const''' and '''param''' to declare : runtime constants and compile-time constants. We can set a '''const''' variable's value at runtime. But '''param''' variable requires to set it Must be known at beginningcompile time.
var myVar1: real;
param myVar3 = 3.14;
We can use the '''config''' keyword : used before above keywords to make the variable can be allow overridden on the command line.
config var myVar4: bool = false; //./variable --myVariable=true
46
edits

Navigation menu