-- -- test function class TEST_FUN creation make feature j : INTEGER k : INTEGER make is do j := 2 k := 5 put_jk io.put_integer(fun01) io.put_new_line io.put_integer(fun01) io.put_new_line put_jk io.put_integer(fun02(j,k)) io.put_new_line io.put_integer(fun02(3*j,k+1)) io.put_new_line put_jk end put_jk is do io.put_string("j, k = ") io.put_integer(j) io.put_string(", ") io.put_integer(k) io.put_new_line end fun01 : INTEGER is local -- Result : INTEGER is implicitly declared do Result := j + 2*k +32 end fun02(x,y : INTEGER) : INTEGER is local -- Result : INTEGER is implicitly declared do Result := 10*x + y end end -- TEST_FUN