var Str: string; C: Char; I: Integer;begin Str := 'level'; for C in Str do WriteLn(C); //iterating with index: 1-based for I := 1 to Length(Str) do WriteLn('str[', I, '] = ', Str[I]);end.