[Solved] How can one verify whether consecutive letters have been entered from the qwerty keyboard in a delphi console application?
Try something like this: function HasThreeConsecutiveLetters(const Str: string): Boolean; const QwertyLetters: array[0..2] of string = ( ‘QWERTYUIOP’, ‘ASDFGHJKL’, ‘ZXCVBNM’ ); var I, J, K: Integer; S: String; begin Result := False; S := AnsiUpperCase(Str); for I := 1 to Length(S) do begin for J := Low(QwertyLetters) to High(QwertyLetters) do begin K := Pos(S[I], QwertyLetters[J]); if … Read more