Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: put null on string variable remember previous put
Message
De
07/04/2004 06:47:46
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
BUG: put null on string variable remember previous put
Divers
Thread ID:
00892851
Message ID:
00892851
Vues:
67
You want to make to come badly to your head?

Run next:
NoBug1()
Bug1()
TryToRemoveBug1()

PROCEDURE NoBug1
LOCAL X,Y
Y = 'AAA'
X = 'AAAA'
X = .NULL.
? CTOBIN(m.X)
Y = .NULL.
? CTOBIN(m.Y)
ENDPROC

PROCEDURE Bug1
LOCAL X,Y
X = 'AAAA'
Y = 'AAA'	&& this string is 3 lenght, a bad lenght for CTOBIN
X = .NULL.      && X is filled with a null string with lenght = 3
? CTOBIN(m.X)   && <== error
Y = .NULL.	&& Y is filled with a null string with lenght = 3
? CTOBIN(m.Y)   && <== error
ENDPROC

PROCEDURE TryToRemoveBug1
LOCAL X,Y,Z
X = 'AAAA'
Y = 'AAA'	  && this string is 3 lenght, a bad lenght for CTOBIN
X = .NULL.        && X is filled with a null string with lenght = 3
? CTOBIN(m.X)     && <== error
Y = .NULL.	  && X is filled with a null string with lenght = 3
? CTOBIN(m.Y)     && <== error
X = 'S'		  && 1 is good for CTOBIN, this remove the bug ? No
Y = .NULL.	  && i think this operation is ignored because Y is NULL
? CTOBIN(m.Y)     && <== error
Y = 'AAA'	  && this string is 3 lenght, a bad lenght for CTOBIN
X = 'S'		  && 1 is good for CTOBIN, this remove the bug ? Yes
Y = .NULL.	  && Y is filled with a null string with lenght = 1
? CTOBIN(m.Y)     && <== no error
ENDPROC
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform