// Test of string operations
//
// $Id: test4.mgl,v 1.3 2004/11/29 11:17:21 gkminix Exp $

program test4;

const
  const1 = "test4";
  const2 = "mytest";

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.

