Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG?... should REPLICATE fail if a negative 'nTmes' value su
Message
De
27/04/2004 20:12:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
BUG?... should REPLICATE fail if a negative 'nTmes' value su
Divers
Thread ID:
00898770
Message ID:
00898770
Vues:
37
The following pertains to VFP8 SP1, unchecked in other releases/SPs...

The syntax of the REPLICATE function is:
REPLICATE(cExpression, nTimes)
. Many times one will code an expression in the nTimes parameter.

When the nTimes evaluates to a negative value VFP will emit the error message:
String is too long to fit..

Obviously the error message itself is erroneous and warrants correction.

But the larger question regards whether this should be an error condition or not.

My take is that it should not generate an error, but simply return nothing (an empty string). This seems top be what happens when 0 (zero) is supplied as the nTimes parameter.

Comments?... which will determine if this goes into the UT bug list or not
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform