Changes

Jump to: navigation, search

GPU621/Chapel

315 bytes added, 23:21, 29 November 2022
Special MEthods
}
=== Special MEthods Methods ===
*An initializer named init is called when creating an instance of the class or record.
*A method named init= is called a copy initializer and accepts a single argument.
*If a method named postinit that accepts zero arguments exists for a class or record type, it will automatically be called after the initializer call completes.
*The deinit method will deinitialize a record when it leaves scope, or a class when delete is called on it.
*The this method gives the record the ability to be accessed like an array.
*An iterator named these that can accept zero arguments is automatically called when a record or class instance is used in the iterator position of a for loop.
*The writeThis and readThis methods allows user to read or write the instance.
= Reference =
73
edits

Navigation menu