Cita:
|
Empezado por eduarcol
Ok val sirve para los enteros, ¿¿y los reales??
|
¿Estas completamente seguro?
Fui a la ayuda y me di con esto:
Cita:
|
Empezado por ayuda
Val converts the string value S to its numeric representation, as if it were read from a text file with Read.
S is a string-type expression; it must be a sequence of characters that form a signed real number.
V is an integer-type or real-type variable.
|
Para que funcione volví a la función y la alteré por esta:
Código Delphi
[-]function EsNumero(Numero: string): boolean;
var
Chequeo: integer;
Num: real;
begin
val(Numero, Num, Chequeo);
result := (Chequeo = 0);
end;
Saludos,