exitFunction.wacc 180 Bytes
Newer Older
Luke  Thorpe's avatar
Luke Thorpe committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# exit instead of returning from a function

# Output:
# #empty#

# Exit:
# 42

# Program:

begin
  char f() is
    exit 42
  end

  char c = call f() ;
  println c ;
  exit 0
end