Dove sbaglio?codice:procedure TForm1.btControllaClick(Sender: TObject); begin while ( txtNome.Text ) Begin If ( txtNome.Text == "a" ) then Begin a_count := a_count+1; End else Begin a_count := a_count-1; End txtA.Text := (String) a_count; End end.
Dove sbaglio?codice:procedure TForm1.btControllaClick(Sender: TObject); begin while ( txtNome.Text ) Begin If ( txtNome.Text == "a" ) then Begin a_count := a_count+1; End else Begin a_count := a_count-1; End txtA.Text := (String) a_count; End end.
La stupidità umana e l'universo sono infinite.
Della seconda non sono certo(Einstein)
Gnu/Linux User
Stai scrivendo usando le convenzioni del C!
Ti suggerisco di leggere qualche guida introduttiva a Delphi consultando le discussioni passate a riguardo.
MARCO BREVEGLIERI
Software and Web Developer, Teacher and Consultant
Home | Blog | Delphi Podcast | Twitch | Altro...
se me lo correggi magari capisco l'errore![]()
La stupidità umana e l'universo sono infinite.
Della seconda non sono certo(Einstein)
Gnu/Linux User
codice:procedure TForm1.btControllaClick(Sender: TObject); var i:integer; begin for i:=1 to Length(txtNome.Text)do Begin If txtNome.Text[i] = 'a' then inc(a_count) else dec(a_count); txtA.Text := IntToStr(a_count); End; end;