function
IsStrANumber(const S: string):
Boolean;
var
P: PChar;
begin
P := PChar(S);
Result := False;
while P^ <> #0 do
begin
if not (P^ in ['0'..'9']) then Exit;
Inc(P);
end;
Result := True;
end;
var
P: PChar;
begin
P := PChar(S);
Result := False;
while P^ <> #0 do
begin
if not (P^ in ['0'..'9']) then Exit;
Inc(P);
end;
Result := True;
end;
Contoh penggunaan
If IsStrANumber
(Edit1.text ) = true then ShowMessage(‘Data Adalah Numeric’)
Else ShowMessage(‘Data Bukan Numeric’);
pak gmmn caranya membuat laporan dalam bentuk chart apa yang mesti dilakukan,
ReplyDeleteakhmad_maknur