Changes

Jump to: navigation, search

GPU621/Chapel

2 bytes added, 23:42, 29 November 2022
Class
== Class ==
Like C++, the prime Chapel allows the user to create a new type that can contain variables and constants, called fields, as well as functions and iterators called methods. A new class type is declared using the class keyword.
class C {
var a, b: int;
}
}
 
== Record ==
A record type can be declared using the record keyword. A record is a type that can contain variables and constants, called fields, as well as functions and iterators called methods. Records have many similarities to classes, but there are several important differences:
73
edits

Navigation menu