-
Notifications
You must be signed in to change notification settings - Fork 2
/
square.mlm
31 lines (28 loc) · 908 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 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 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: