Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getwordnum and the carriage return character
Message
De
05/08/2009 08:41:45
 
 
À
05/08/2009 08:39:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01416171
Message ID:
01416176
Vues:
51
>>>This is odd, to say the least. The next line prints 13, indicating that the carriage return character is the last character of the third word. It should have been 108.
>>>
? asc( right( getwordnum("huppel de puppel" + chr(13)+chr(10), 3 ),1 ) )
>>>Is this a bug or is it by design? Who knows more?
>>
>>
>>The 3th word is: "puppel" + chr(13)+chr(10) not just "puppel" :-) That is because default delimiter is space.
>>Try:
>>
>>WAIT WINDOW getwordnum("huppel de puppel" + chr(13)+chr(10), 3 ) + [Test string]
>>
>
>Two remarks here:
>
>1) The help text says: The default delimiters are space, tab, carriage return, and line feed. One would expect that all delimiters are removed/ignored in the resulting word, as is the case with space.
>
>2) The linefeed character is indeed removed.
>
>Are you suggesting here that it is by design? That it is a way to know where a line ends? In that case it should have been documented.
WAIT WINDOW getwordnum("huppel de puppel" + chr(13)+chr(10), 3, " "+CHR(13)+CHR(10) ) + [Test string]
Never relay on default values :-))))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform