makefile fix and table with results so far added to ex3
[tt2015.git] / a3 / code / Gast / launch.icl
1 implementation module launch
2
3 import StdEnv
4 import /*StdIO,*/ostoolbox, clCCall_12
5
6 //Start = launch (applicationpath "hello.exe") 42
7 /*Start
8 # (ok1,exit1,tb) = launch exe (toGIF "test") 42
9 # (ok2,exit2,tb) = launch exe (toMAP "test") tb
10 = (ok1 && ok2, (exit1,exit2),tb)*/
11 //Start = launch exe arg 42
12
13 /*
14 exe = "C:\\Program Files\\ATT\\Graphviz\\bin\\dot.exe"
15 toGIF dot = "-Tgif -o " +++ dot +++ ".gif " +++ dot +++ ".dot"
16 toMAP dot = "-Tcmapx -o " +++ dot +++ ".map " +++ dot +++ ".dot"
17
18 exe = "D:\\Peter\\Projecten\\SpecificationVerification\\LaunchExternalApplication\\showCmndlineArgs.exe"
19 arg = "one two three four"
20 */
21
22 launch :: !PathAndApplication !CommandlineArgs !*World -> (!Bool,!Int,!*World)
23 launch command cmndline world
24 # (tb,world) = worldGetToolbox world
25 # (commandptr,tb) = winMakeCString (command+++" "+++cmndline) tb
26 # (success,exitcode,tb) = winCallProcess commandptr 0 0 0 0 0 tb
27 # tb = winReleaseCString commandptr tb
28 # world = worldSetToolbox tb world
29 = (success,exitcode,world)