coba pakai fungsiku ini dijamin enak function IsAngka(const text: string): Boolean; const angka =['0'..'9']; var I: Integer; begin Result := False; if (Length(text) = 0) or not (text[1] in angka) then Exit; for I := 2 to Length(text) do if not (text[I] in angka) then Exit; Result := True; end;
function IsHuruf(const text: string): Boolean; const Alpha = ['A'..'Z', 'a'..'z']; var I: Integer; begin Result := False; if (Length(text) = 0) or not (text[1] in Alpha) then Exit; for I := 2 to Length(text) do if not (text[I] in Alpha) then Exit; Result := True; end; function Isoperator(const text: string): Boolean; const oper = ['-','+','*','/']; var I: Integer; begin Result := False; if (Length(text) = 0) or not (text[1] in oper) then Exit; for I := 2 to Length(text) do if not (text[I] in oper) then Exit; Result := True; end; --- Anwar Sanusi <[EMAIL PROTECTED]> wrote: > Hi all, > > gimana caranya kita mengecek nilai sebuah string itu > alphabet atau numeric ? > > thanks > Anwar > > > __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA/i7folB/TM ---------------------------------------------------------------------~-> Berlangganan: [EMAIL PROTECTED] Stop Berlangganan: [EMAIL PROTECTED] Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
