Ver Mensaje Individual
  #10  
Antiguo 07-07-2007
Avatar de Delphius
[Delphius] Delphius is offline
Miembro Premium
 
Registrado: jul 2004
Ubicación: Salta, Argentina
Posts: 5.582
Reputación: 27
Delphius Va camino a la fama
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,
__________________
Delphius
[Guia de estilo][Buscar]
Responder Con Cita