Pausa while

Delphi

21/09/2018

eu consigo pausar um while ate o usuario apertar enter
Abner Carvalho

Abner Carvalho

Curtidas 0

Respostas

Natanael Ferreira

Natanael Ferreira

21/09/2018

Sim. Você pode pausar o while com uma mensagem, por exemplo, pedindo para o usuário teclar enter para continuar.

Exemplo:

var
  cont: Integer;
begin
  cont := 0;

  while cont < 10 do
  begin
    Inc(cont);
    Caption:= IntToStr(cont);

    if cont = 5 then
      ShowMessage('Tecle enter para continuar.');
  end;
end;
GOSTEI 0
Elisawise

Elisawise

21/09/2018

Você ajudou a tornar isso mais claro para mim! <a href="http://rollingskygame.com/run-3">run 3</a>

GOSTEI 0
Elisawise

Elisawise

21/09/2018

[url=http://rollingskygame.com/run-3]run 3[/url]
http://rollingskygame.com/run-3
GOSTEI 0
POSTAR