Home News DOC Class DL Others Cooker
Documents  >  Reference  >  Class definition
Class definition

Class definition

Class definition is a set of member definitions that is described between the class and the endclass. It decide class status and behaviour.

Class definition is the following format.

class class-name

Member definitions


It can use the abbreviation ec instead of endclass.

Member definitions are the following five types.

Field declaration

Fitter definition

Setter definition

Getter definition

Method definition

Class name have to be specified after the class. The naming rule of class name is same as an identifier. A field declaration decides about the state of the class. A fitter, setter, getter, and method definition decide about behavior of the class.

Please refer to a manual about details of member definitions.


When the execution of the program is started, Rice makes the prototype of the class from a source file. And, the prototype is linked with class name and is saved.

Rice returns the copy of a prototype to the generation demand of the class instance from a program.

Access control of class

In Rice, there is not the class access modifier such as the object-oriented language. Namely, a class in the Rice is always accessible, and it can generate anywhere.

Copyright © Rice All rights reserved.