From Clomosy Docs
Now that you have seen the basic structure of a TRObject program, it will also be easier for you to understand the other fundamental building blocks of the TRObject programming language.
Variable Declaration
In the Clomosy platform, variable declaration is an important step for storing and processing data during the execution of a program. Variables are defined to hold values of a specific data type and can be used in different parts of the program. When declaring a variable, the var keyword is used first. Under this keyword, multiple variables can be defined.
Under the var keyword, the name of the variable to be declared is specified first, followed by the data type to be used (for example, integer, floating-point, or text). This allows values to be dynamically assigned during the program flow, enabling various operations to be performed on these values. Proper variable declarations enhance code readability and facilitate program maintenance.
var
A_Variable, B_Variable ... : Variable_Type;
TRObject variables are declared outside the main code body. However, they are declared after the definition of a procedure/function and before the block definition ({...} ).
Example
var numOfDays: Integer; userAge: Integer; isConfirmed: Boolean; isActive: Boolean; userName: String; userCity: String; accountNumber: Double; floatingPointNumber: Float; totalFees: Real; totalExpenses: Real;
Comments
For multiline comments, /* ... / and ( ... *) are used. For a single line, the use of two forward slashes // ... is allowed for comments.
/* This is a multi-line comments and it will span multiple lines. */ (* This is a multi-line comments and it will span multiple lines. *) // This is a single line comment in clomosy
Case Sensitivity
TRObject is a case-insensitive language, which means you can write your variables, functions, and procedures in either case. For example, the variables A_Variable, a_variable, and A_VARIABLE have the same meaning in TRObject.
Reserved Words in TRObject
Statements are designed with specific TRObject words, which are called reserved words. For example, the words var, string, ShowMessage, real are reserved words. Variable names cannot be assigned using these words. These words can be found on the Keywords page.