class Test def main is shared Test().run def run # basic out/inout tests with ints x = 0 y = 0 .setValues1(inout x, inout y) assert x == 1 assert y == 2 .setValues2(out x, out y) assert x == 3 assert y == 4 # now with a struct with no parameterless constructor dt = DateTime.today .setTodayIO(inout dt) .setTodayO(out dt) # now a reference type s = 'asdf' .setString(out s, 'aoeu') assert s == 'aoeu' def setValues1(x as inout int, y as inout int) assert x == 0 assert y == 0 x = 1 y = 2 def setValues2(x as out int, y as out int) x = 3 y = 4 def setTodayIO(dt as inout DateTime) dt = DateTime.today def setTodayO(dt as out DateTime) dt = DateTime.today def setString(s as out String, t as String) s = t