Do Block & On Event


#1

1) Give a description of the problem

From the Advanced Statements
a) Can anyone explain what is a Do Block? Can you provide a simple example.
b) Can anyone explain what is a On Event? Can you provide a simple example.

Thank you


#2

In computer programming, a block or code block is a lexical structure of source code which is grouped together. Blocks consist of one or more declarations and statements. For instance…

IF **condition**
   THEN
      DO
          Set x = value;           {these instructions are grouped}
          Turn switch on;          {together and happen logically in this DO Block}
END IF

ON EVENT is similar. See HERE for a short discussion and examples.