forked from hflicka/example-mlms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
arguments.mlm
53 lines (45 loc) · 1.62 KB
/
arguments.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
44
45
46
47
48
49
50
51
52
53
/*
* You may run this MLM with: $ arden2bytecode -r arguments.mlm
* However, to pass arguments, use the -a flag of Arden2ByteCode. The string
* following the -a flag must be a valid constant Arden Syntax expression.
* Otherwise a parsing error will occur.
* To be a valid Arden Syntax expression, a string must be surrounded
* by quotes which, in turn, must be properly escaped when being
* passed on the command line.
* Passing the string "argument 1" would be:
* $ arden2bytecode -a "\"argument 1\"" -r arguments.mlm
*
* Windows Command Prompt:
* $ arden2bytecode -a (3.5,2) "5 WEEKS" 123 "\"Jane Doe\"" -r arguments.mlm
*
* Bash:
* $ ./arden2bytecode -a '(3.5,2)' '5 WEEKS' 123 '"Jane Doe"' -r arguments.mlm
*/
maintenance:
title: Example of how to pass arguments;;
mlmname: arguments;;
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 how to pass arguments to a MLM;;
explanation: n.a.;;
keywords: example, arden2bytecode, arguments;;
links: http://arden2bytecode.sf.net/ ;;
knowledge:
type: data_driven;;
data: (arg1, arg2, arg3, arg4, arg5) := ARGUMENT ;;
evoke: /* MLM is called directly */ ;;
logic: CONCLUDE TRUE ;;
action:
WRITE "Argument number 1 is: " || arg1;
WRITE "Argument number 2 is: " || arg2;
WRITE "Argument number 3 is: " || arg3;
WRITE "Argument number 4 is: " || arg4;
WRITE "Argument number 5 is: " || arg5;
;;
end: