PDA

Ver la Versión Completa : Problema con el caracter '


Sr.Scorpion
31-10-2008, 18:20:31
Hola

Tengo el siguiente problema tengo un reporte en donde tengo q procesar la duracion y se me puede mostrar de la siguiente forma 00:00'17 ó 00:00:17 tengo la siguiente condicion


If (Copy(Cad,Pos(':',Cad) + 3,1) = ':') or (Copy(Cad,Pos(':',Cad) + 3,1) = ''') Then


por supuesto q me da error.... en la ultima condicion... alquien se sabe el equivalente en hexadecimal o lo q sea para sustituir el caracter '

Saludos

StartKill
31-10-2008, 18:25:15
Holas

Original del Sr. Scorpion
If (Copy(Cad,Pos(':',Cad) + 3,1) = ':') or (Copy(Cad,Pos(':',Cad) + 3,1) = ''') Then

por supuesto q me da error.... en la ultima condicion... alquien se sabe el equivalente en hexadecimal o lo q sea para sustituir el caracter '


If (Copy(Cad,Pos(':',Cad) + 3,1) = ':') or (Copy(Cad,Pos(':',Cad) + 3,1) = char(39)) Then

Your friend

StartKill
Lima-Perú

DarkMan
31-10-2008, 18:39:20
Mirando la ayuda de delphi:
A character string, also called a string literal or string constant, consists of a quoted string, a control string, or a combination of quoted and control strings. Separators can occur only within quoted strings.
A quoted string is a sequence of up to 255 characters from the extended ASCII character set, written on one line and enclosed by apostrophes. A quoted string with nothing between the apostrophes is a null string. Two sequential apostrophes in a quoted string denote a single character, namely an apostrophe. For example,
'BORLAND' { BORLAND }
'You''ll see' { You'll see }
'''' { ' }
'' { null string }
' ' { a space }
A control string is a sequence of one or more control characters, each of which consists of the # symbol followed by an unsigned integer constant from 0 to 255 (decimal or hexadecimal) and denotes the corresponding ASCII character. The...

Sería de esta forma:
If (Copy(Cad,Pos(':',Cad) + 3,1) = ':') or (Copy(Cad,Pos(':',Cad) + 3,1) = '''') Then

Sr.Scorpion
31-10-2008, 18:57:19
Todo resuelto... muchas gracias