# Test of string operations # # $Id: test4.mgl,v 1.2 2001/08/27 08:40:16 gkminix Exp $ const const1 = "test1"; const2 = "mytest"; screen main; var s1, s2 : string[20]; c : char; i : integer; begin # String assignments s1 := const1; s2 := const2 + ' ' + const1; s1 := const1 + "\033[44\r\n\t"; # String expressions i := (s1.len + 20) * s2.len; c := s1[5]; s1 := s2[5,10]; s1 := s2[7,30]; # should truncate s1 := s2[40,50]; # should give empty string end.