-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.mlm
38 lines (35 loc) · 1.17 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
// You may run this MLM with: $ arden2bytecode -r example.mlm
maintenance:
title: Example MLM;;
mlmname: examplemlm;;
arden: version 1.0;;
version: 1.0;;
institution: Peter L. Reichertz Institut;;
author: Hannes Flicka;;
specialist: Hannes Flicka;;
date: 2012-04-04;;
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
// set a destination for the write statement later used:
let dest be destination {stdout};;
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 || "." at dest;;
end: