Statement: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 1: Line 1:
A '''statement''' is a piece of scripting code. It is a '''single instruction''' to the [[Script Interpreter|script interpreter]] and tells it to do something.
A '''statement''' is a piece of scripting code. It is an '''instruction''' to the [[Script Interpreter|script interpreter]] and tells it to do something.
 
== Types of Statements ==


A statement can be:
A statement can be:
* value assignment
* control structure
* command


=== Value Assignment ===
=== Value Assignment ===

Revision as of 21:08, 21 December 2006

A statement is a piece of scripting code. It is an instruction to the script interpreter and tells it to do something.

Types of Statements

A statement can be:

  • value assignment
  • control structure
  • command

Value Assignment

An assignment of a value to a variable

_variable = ...

Control Structure

Any control structure including its blocks.

if (_value > _limit) then
{
    hint "oh no";
}

Command

Any scripting command including its arguments.

player sideChat "hello";