%sample7.t % lots of substring examples var st,st2 : string st := "university of toronto" put "st is ",st put "st(1) is ",st(1) put "st(7) is ",st(7) put "st(15..21) is ",st(15..21) put "st(4..4) is ",st(4..4) var x : int x := 5 put "st(x) is ",st(x) put "st(x+2..9) is ",st(x+2..9) st2 := st(x) + st(4..6) + st(x*2) + "one" %uses concatenation too put "st2 was ",st2