forked from hflicka/example-mlms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
square.mlm
31 lines (28 loc) · 924 Bytes
/
square.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
// You may run this MLM with: $ arden2bytecode -r square.mlm
maintenance:
title: Square a value;;
mlmname: square;;
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 read statement and multiplication;;
explanation: n.a.;;
keywords: example, arden2bytecode, read statement, square, multiplication;;
links: http://arden2bytecode.sf.net/ ;;
knowledge:
type: data_driven;;
data:
LET variable BE read {Enter variable value};;
evoke: /* MLM is called directly */ ;;
logic:
LET square BE variable * variable;
CONCLUDE TRUE;;
action:
WRITE "You entered: " || variable || ".";
WRITE "Multiplied with itself, that is: " || square || ".";;
end: