Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG?... should REPLICATE fail if a negative 'nTmes' value su
Message
From
27/04/2004 20:12:17
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
BUG?... should REPLICATE fail if a negative 'nTmes' value su
Miscellaneous
Thread ID:
00898770
Message ID:
00898770
Views:
38
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
Next
Reply
Map
View

Click here to load this message in the networking platform