Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replicate
Message
 
 
To
09/12/2003 15:04:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00857361
Message ID:
00857484
Views:
25
>I want to replacte a string would would like to display in the string
>the number the replication is in the string
>
>Ouput example:
>Replicate("Form"+STR(replication number),3)
>Form 1
>Form 2
>Form 3
>
>Is there a way to access the counter for Replicate() to do this?

Here's code based on Re: Does an inverse of ALINES() exist? Message #732084 that produces required result.
? NVL(_VFP.SetVar("nSub", 1), "") + Textmerge( ;
  Replicate('Form <<STR(nSub) + NVL(_VFP.SetVar("nSub", nSub+1), "")>><<Chr(13)+Chr(10)>>', 3))
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform