// Return the first and last character of a string function firstAndList(s: string; out first: char; out last: char); begin first := s[1]; last := s[length(s)]; end;