aboutsummaryrefslogtreecommitdiff
path: root/tests/i/template-multifile/program.cps
blob: dd0684fa17cbcef003b49266499e70a79631f97a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

INCLUDE "lib.cps"
TYPE Score
    DECLARE Value : INTEGER
ENDTYPE
OVERLOAD FUNCTION OPERATOR>(Left : Score, Right : Score) RETURNS BOOLEAN
    RETURN Left.Value > Right.Value
ENDFUNCTION
DECLARE Low : Score
DECLARE High : Score
Low.Value <- 3
High.Value <- 9
DECLARE Best : Score
Best <- Max(Low, High)
OUTPUT Best.Value