Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replicatestring Adding an extra space

Status
Not open for further replies.

BigDarrin

Technical User
Sep 11, 2002
17
US
Just curious as to what might be causing this and if anyone else has noticed this behavior. Given the following code for a fixed length field:

NumberVar reqlength:=9;
NumberVar currlength:=0;

if currlength < reqlength then
replicatestring(&quot; &quot;,reqlength - currlength)
else
&quot;&quot;

If I use any character other than &quot; &quot;, it produces the desired results, that is, it produces 9 of whatever is there. If I use a space, it produces 10 of them, not nine. This seems to happen in around the same area of a file, namely, somewhere around the 75-100 character area.

Does anyone have any light they can shed on this EXTREMELY frustrating behavior? I've seen this on several reports and space(9) produces similar results, though not as easily detected.

Thank you,
Darrin
 
Sorry, I forgot to mention that it is Crystal 8.5.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top