Procedure GetPlayerNames;
Begin
Repeat
Write('Enter player one name: ');
Readln(FirstPlayer);
If Length(FirstPlayer) = 0 Then
Writeln('No, the player name must be more than l character')
Else
Begin
Write('Enter player two name: ');
Readln(SecondPlayer);
If Length(SecondPlayer) = 0 Then
Writeln('No, the player name must be more than l character')
End;
Until (Length(FirstPlayer > 0)) And (Length(SecondPlayer > 0));
End;
I want to ensure that the player enters a name that is obviously more than one character to ensure that the program does not crash. For some strange reason, this isn't working.