Home About Rice Downloads Documents Others Cooker CookerGX
Documents  >  Reference  >  reservedvariable
reserved variable

A varivable which will be Automatically defined.

The Rice have variables that will be automatically defined in a particular context. This is called a reserved variable.

The following is list of reserved variables


__count

__index

__value

__key

__error


Please note that a name of the reserved variables start with double underscores.

__count

__count is a reserved variable which will be defined automatically when the loop control reaches to the first statement of the while, fromto, and each statement.

__count is a variable of int. It is initialized with the number of loops that starts from zero.

__count does not cause the overflow like a normal int. If __count has exceeded the maximum value of the int, it will be automatically back to zero.

__index

__index is a reserved variable which will be defined automatically when the loop control reaches to the first statement of the fromto statement.

__index is a variable of int. It is initialized with the current loop index value.

__value

__value is a reserved variable which will be defined automatically when the loop control reaches to the first statement of the each statement.

__value is initialized with a element of the collection. Type of __value depends on type of the element.

__key

If the collection of the each statement is a dictionary class, __key is a reserved variable which will be defined automatically when the loop control reaches to the first statement of the each statement.

__key is a variable of string. It is initialized with a key of the element of the dictionary.

__error

__error is a reserved variable which will be defined automatically when the control reaches to the first statement of the catch clause of the try statement.

__error is a variable of error class.

Next
Previous
Copyright © Rice All rights reserved.