Arsip: deteksi

 
user image
more 16 years ago

NggotMan

gini..lgsg aj ya.. klo mo bkin deteksi bilangan itu INTEGER atau bkn tuh gimn ya? :roll:
user image
more 16 years ago

pradhana

Bisa dicoba fungsi ini. Semoga bermanfaat.

function CheckInteger(value: String): Boolean;
var
  I, Code : Integer;
begin
  Val(value, I, Code);
  if Code<>0 then
    Result := False
  else
    Result := True;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
 if CheckInteger(Edit1.Text) = True then
    ShowMessage('Hasil: Integer')
 else
    ShowMessage('Hasil: Bukan Integer');
end;
user image
more 16 years ago

mas_kofa


    try
       x := StrToInt(Edit1.Text);
      showmessage('Hasil Integer');
    except
      x := 0;
      showmessage('Hasil Bukan Integer');
    end;
user image
more 16 years ago

NggotMan

ok mas..tak cb dl ya.. matur nuwun.. terima kasih.. danke schoon!! GANBATTE!!
more ...
  • Pages:
  • 1
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com