Fórum Statement expected but ´PROCEDURE´ found #207034
16/01/2004
0
unit Uteste;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
btn1: TButton;
btn2: TButton;
procedure btn1Click(Sender: TObject);
procedure btn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
begin
if btn1.Enabled = true then
begin
btn1.Enabled := false;
btn2.Enabled := true;
btn1.Caption := ´OFF´;
btn2.Caption := ´ON´;
end;
[b:a53ac8c292]procedure TForm1.btn2Click(Sender: TObject);[b]
begin
if btn2.Enabled = true then
begin
btn2.Enabled := false;
btn1.Enabled := true;
btn2.Caption := ´OFF´;
btn1.Caption := ´ON´;
end;
end.
O cursor para depois da palavra procedure!!!!
[b][Error] Uteste.pas(38): Statement expected but ´PROCEDURE´ found[b]
este é o erro q aparece embaixo.[/b:a53ac8c292]
[b:a53ac8c292]Título editador pelo Moderador (AZ) - Removido: ´Ainda não deu certo´[/b:a53ac8c292]
Pekeno_ctba
Curtir tópico
+ 0Posts
16/01/2004
Arc
Qdo tudo parece correto, não se acha erros nos fontes, eu prefiro apagar e fazer novamente, eu li a sua outra mensagem, como seu codigo ainda é pequeno, ..., se fosse vc apagaria tudo o que esta dentro dos begins e ends das procedures, apagaria os botoes, colocaria novos, e escreveria tudo novamente com o cuidado para não apagar as informações ja existentes..... como Begin e End, o que é até comum de acontecer....
Gostei + 0
16/01/2004
Rômulo Barros
--------------------------------------------------------------------------------
Fiz exatamente como vc falou, mas continua dando erro!!!
unit Uteste;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
btn1: TButton;
btn2: TButton;
procedure btn1Click(Sender: TObject);
procedure btn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
begin
if btn1.Enabled = true then
begin
btn1.Enabled := false;
btn2.Enabled := true;
btn1.Caption := ´OFF´;
btn2.Caption := ´ON´;
end; [color=red:1591d26840]// Fim do if[/color:1591d26840]
[color=red:1591d26840]end; //fim do procedure [/color:1591d26840]
procedure TForm1.btn2Click(Sender: TObject);[b]
begin
if btn2.Enabled = true then
begin
btn2.Enabled := false;
btn1.Enabled := true;
btn2.Caption := ´OFF´;
btn1.Caption := ´ON´;
end; [color=red:1591d26840]//Fim do if[/color:1591d26840]
[color=red:1591d26840]end; // fim da procedure[/color:1591d26840]
end.
:twisted: :evil: :twisted:
Gostei + 0
16/01/2004
Marcelo Saviski
E você leu oque eu escrevi, lá disse que para dar certo, tem que ter um
procedure begin end;
:?:
Gostei + 0
16/01/2004
Aroldo Zanela
Acho que ele queria negritar o texto na mensagem. Para colocar um texto em negrito, a melhor forma é primeiro digitar o texto, marcar (selecionar com o mouse) e depois pressionar a letra B (Bold) logo acima ao invés de fazer manualmente, pois o phpBB faz a abertura e fechamento da tag.
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)