From Clomosy Docs

Below are the headings for different usage structures of syntax used in the Clomosy platform. How each syntax is utilized will be detailed under the respective topics.

  • Loops
  • Conditions
  • Operators
  • Error Handling
  • Procedure Usage

Every Clomosy program has an execution section in a specific order. The following format shows the basic syntax of a Clomosy program:

const //global constant declaration block
var //global variable declaration block

function //function declarations, if any
  //local variables
{
...
}

void //procedure declarations, if any
  //local variables
{
...
}

{ //main program block starts
...
} //the end of main program block 


TRObject Hello World Example

Following is a simple trobject code that would print the words "Hello, World!"

{
  ShowMessage('Hello World!');
}


This will produce following result

Let us look various parts of the above program

Execute Clomosy Program

Block Structure

In the TRObject programming language, block structures are used in various places to organize the logic of the code, manage control flow, and limit specific operations. Here are the common usage areas of block structures in TRObject:

  • Main Block
  • Procedures and Functions
  • Conditional Statements
  • Loops
  • Error Management

A block structure is defined with curly braces ({...}) in TRObject syntax.

{
  ...
}