Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 17-03-2008
sdiaz1983 sdiaz1983 is offline
Miembro
 
Registrado: sep 2007
Posts: 52
Poder: 17
sdiaz1983 Va por buen camino
R: Un Favor

Cita:
Empezado por eduarcol Ver Mensaje
podrias decir cuales son la serie de errores??
NO DISCULPEME POR FAVOR, LOS ERRORE SLOS TENIA YO ACA EN LA APLICACION, UN FAVOR QU EEL AGRADECERIA ES SI POR FAVOR ME PUEDE EXPLICAR EL CODIGO PARA ENTENDERLO, EN PARTICULAR ESTA PARTE.

var Value: Cardinal; Code: Integer;
begin
Val(numero, Value, Code);
if LongBool(Code) then


MIL GRACIAS POR SU AYUDA
Responder Con Cita
  #2  
Antiguo 17-03-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Poder: 20
cHackAll Va por buen camino
Cita:
Empezado por sdiaz1983 Ver Mensaje
...ME PUEDE EXPLICAR EL CODIGO PARA ENTENDERLO, EN PARTICULAR ESTA PARTE.

var Value: Cardinal; Code: Integer;
begin
Val(numero, Value, Code);
if LongBool(Code) then


MIL GRACIAS POR SU AYUDA
CLARO QUE SIII

Cita:
Empezado por (F1) sobre la función
Converts a string to a numeric representation.

Delphi syntax:
procedure Val(S; var V; var Code: Integer);

Description
In Delphi code, 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. If V is an integer-type variable, S must form a whole number.

Code is a variable of type Integer.

If the string is invalid, the index of the offending character is stored in Code; otherwise, Code is set to zero. For a null-terminated string, the error position returned in Code is one larger than the actual zero-based index of the character in error.

Val performs range checking differently depending upon the setting of the $R compiler directive and the type of the parameter V.
Resumen; Val intenta convertir S a un valor numerico. Si lo consigue retorna su valor (entero, real, con signo o no), en la variable V y retorna en Code 0 (cero), caso contrario (S no es reconocida) retorna el error correspondiente en Code (<> 0)

Saludos
Responder Con Cita
  #3  
Antiguo 17-03-2008
sdiaz1983 sdiaz1983 is offline
Miembro
 
Registrado: sep 2007
Posts: 52
Poder: 17
sdiaz1983 Va por buen camino
Cita:
Empezado por cHackAll Ver Mensaje
CLARO QUE SIII



Resumen; Val intenta convertir S a un valor numerico. Si lo consigue retorna su valor (entero, real, con signo o no), en la variable V y retorna en Code 0 (cero), caso contrario (S no es reconocida) retorna el error correspondiente en Code (<> 0)

Saludos
MIL GRACIAS POR SU AYUDA DIOS LOS BENDIGA, TODO ENTENDIDO.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Usar tipo dato propio en otra clase NEG1414 C++ Builder 1 16-12-2007 23:18:44
tipo de dato de un edit nikotina Varios 3 26-12-2006 16:05:36
como se puede validar un edit para solo numeros carlos gonzalez Varios 3 30-09-2006 21:22:38
Mostrar un dato de un DBGrid en un Edit marial Conexión con bases de datos 3 03-06-2004 21:40:41
Función para validar datos numéricos simples en un Edit de INTRAWEB atirado Varios 0 14-05-2004 19:27:54


La franja horaria es GMT +2. Ahora son las 05:56:27.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi