forked from hflicka/example-mlms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.mlm
43 lines (35 loc) · 1.11 KB
/
example.mlm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// You may run this MLM with: $ arden2bytecode -r example.mlm
maintenance:
title: Example MLM;;
mlmname: example;;
arden: version 2.5;;
version: 2.0;;
institution: Peter L. Reichertz Institut;;
author: Hannes Flicka;;
specialist: Hannes Flicka; Mike Klimek;;
date: 2016-12-07;;
validation: testing;;
library:
purpose: Demonstration of the Arden Syntax Editor;;
explanation: n.a.;;
keywords: example, arden syntax editor, arden2bytecode;;
links: http://arden2bytecode.sf.net/ ;;
knowledge:
type: data_driven;;
data:
// set the variables used in this program:
LET variable BE 4; // <- here you can insert other values to try out
;;
evoke: /* MLM is called directly */ ;;
logic:
// double variable.
// could also use: variable := variable * 2;
LET variable BE variable * 2;
IF variable > 6 THEN
CONCLUDE TRUE; // execute action slot
ELSE
CONCLUDE FALSE; // do not run action slot
ENDIF
;;
action: WRITE "variable is: " || variable || "." ;;
end: