mpl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
mpl [2016/07/11 16:42] – gryphon | mpl [2016/07/13 21:23] – g00r00 | ||
---|---|---|---|
Line 64: | Line 64: | ||
All variables are global to all of the program, including procedures. | All variables are global to all of the program, including procedures. | ||
- | Var <VarName> : <VarType> | + | Var <Variable Name> : <Variable Type> |
| | ||
Examples: | Examples: | ||
| | ||
- | | + | |
- | | + | |
| | ||
- | | + | |
- | | + | |
- | | + | |
| | ||
The following variable types are supported: | The following variable types are supported: | ||
Line 86: | Line 86: | ||
Word Numerical | Word Numerical | ||
LongInt | LongInt | ||
+ | Cardinal | ||
Real Numerical | Real Numerical | ||
- | All variables except ARRAYs can be initialized when when defined. | + | All variables except ARRAYs can be initialized when when defined: |
Var TotalBases : LongInt = GetMBaseTotal(False) | Var TotalBases : LongInt = GetMBaseTotal(False) | ||
Line 96: | Line 97: | ||
ARRAY multi-dimensional variables are supported. | ARRAY multi-dimensional variables are supported. | ||
- | Var < | + | Var < |
- | Var < | + | Var < |
- | Var < | + | Var < |
Examples: | Examples: | ||
- | Var Dummy : Array[1..10] of Byte | + | Var Dummy : Array[1..10] of Byte; |
- | Var Str : Array[5..10] of String | + | Var Str : Array[5..10] of String; |
- | Var Int : Array[1..10, | + | Var Int : Array[1..10, |
- | HEXIDECIMAL values are supported. | + | HEXIDECIMAL values are supported. |
- | Some examples: | + | |
Const | Const | ||
MyHexValue = $1F; | MyHexValue = $1F; | ||
| | ||
- | | + | |
| | ||
- | If Value = $10 Then WriteLn(' | + | If Value = $10 Then |
+ | | ||
==== Record Structures ==== | ==== Record Structures ==== | ||
Line 318: | Line 319: | ||
At the moment, constant variables cannot be used in certain places within the MPE engine. | At the moment, constant variables cannot be used in certain places within the MPE engine. | ||
- | ====== Mystic Programming Language ====== | ||
- | ==== Function ABS (Num: LongInt) : LongInt ==== | ||
- | |||
- | This function takes a signed integer and returns the absolute value. | ||
- | Example: | ||
- | |||
- | Var Int : LongInt = -1234 | ||
- | | ||
- | WriteLn(' | ||
- | ==== Function ALLOWARROW (Boolean) ==== | ||
- | |||
- | Used to turn on arrow key processing in the READKEY function. | ||
- | |||
- | Example: | ||
- | |||
- | AllowArrow := True | ||
- | ReadKey | ||
mpl.txt · Last modified: 2016/07/13 21:27 by g00r00