User Tools

Site Tools


mpl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
mpl [2016/07/11 16:28] – [CASE Statements] gryphonmpl [2016/07/11 16:51] gryphon
Line 288: Line 288:
  
 ==== FUNCTIONS ==== ==== FUNCTIONS ====
 +The syntax for defining a function is as follows:
 +
 +  Function <Function Name> (<varname vartype>) : <result type>
 +
 +IE:
 +
 +  Function AddTen (Num Byte) : Byte
 +  Begin
 +    AddTen := Num + 10
 +  End
 +==== CONST VARIABLES ====
 +The syntax for a constant variable is as follows:
 +
 +String constants:
 +
 +  Const
 +    SomeStr = 'Hello World!'
 +
 +Numerical constants:
 +
 +  Const
 +    SomeNum = 69
 +
 +Constant variables, like regular variables, can be separated with a comma:
 +
 +  Const
 +    SomeNum = 69,
 +    SomeStr = 'Hello World!'
 +
 +At the moment, constant variables cannot be used in certain places within the MPE engine.  If you are assigning a value to a variable, constant values will not be recognized.
 +
mpl.txt · Last modified: 2016/07/13 21:27 by g00r00

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki