tycoon -restart
import dynamic print;
let main(argv :Array(String)) :Int =
begin
print.string("Hello again!\n")
for i = 0 upto extent(argv)-1 do (* print all arguments *)
print.int(i)
print.string(": ")
print.string(argv[i])
print.ln()
end
print.string("Bye bye!\n")
0 (* return value *)
end; (* main *)
dynamic.bootFile(main "main.x"); (* the main function is written *)
do exit; (* exit Tycoon *)
tycoon -create -store main.ts -boot main.x
tycoon -create -store main.ts -boot main.x -user First String "Second String"
You get all the parameters accepted by the Tycoon Machine with 'tycoon -help'.
Note that the Tycoon compiler is also only a main function. It is located in the file 'boot/tycoon.x' that is loaded per default if the parameter '-boot' is missing. The options of the Tycoon compiler are shown by the following command: 'tycoon -create -store test.ts -user -help'.
tycoon -restart
import dynamic print checkpoint;
let main(argv :Array(String)) :Int =
begin
print.string("Hello first time!\n")
if checkpoint.commit() == checkpoint.commitVia then
print.string("Commit.\n")
else
print.string("Hello again!\n")
end
print.string("Bye bye!\n")
0 (* return value *)
end; (* main *)
dynamic.bootFile(main "main.x"); (* the main function is written *)
do exit; (* exit Tycoon *)
tycoon -create -store main.ts -boot main.x
tycoon -restart -store main.ts
tycoon -restart -store main.ts
tycoon -create -store counter.ts -boot counter.x tycoon -restart -store counter.ts tycoon -restart -store counter.ts tycoon -restart -store counter.ts
tycoon -create -store counter.ts -boot counter.x -user tycoon -create -store counter.ts -boot counter.x -user 10 11 tycoon -create -store counter.ts -boot counter.x -user 10AB tycoon -create -store counter.ts -boot counter.x -user "" tycoon -create -store counter.ts -boot counter.x -user 1890191 tycoon -create -store counter.ts -boot counter.x -user 99999 tycoon -restart -store counter.ts -user tycoon -restart -store counter.ts -user 10 11 tycoon -restart -store counter.ts -user 10AB tycoon -restart -store counter.ts -user "" tycoon -restart -store counter.ts -user 1890191 tycoon -restart -store counter.ts -user 2 tycoon -restart -store counter.ts -user 111