Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filetostr + strtofile
Message
From
15/08/2008 12:51:15
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01339125
Message ID:
01339171
Views:
13
This message has been marked as the solution to the initial question of the thread.
>Yes
>
>I should be better if there was: set device to memVar :)

Yes you can, and it's called textmerge :).

Since Set Device is for @say commands, this means you want your set of @say commands to produce a string, not a textfile.

Well, take your textfile into the clipboard, paste it between a TEXT TO lcString TEXTMERGE NOSHOW and TEXTEND, replace anything that was coming from a variable with an appropriate expression in terms of fields etc, and there you are. You may need several levels of textmerge, taking chunks from your text into procedures which will return merged text in variables which you would then merge... but the principle is the same.

Imagine this above is your text. Now watch this code:
lcTxt="text"
lcDefArticle="the"
lnWidth=20

text to lcStr textmerge noshow
replace anything that was coming from a variable with an appropriate expression in terms of fields etc, and <<lcDefArticle>>re 
you are. You may need several levels of <<lcTxt>>merge, taking chunks from your <<lcTxt>> into procedures which will return 
merged <<lcTxt>> in variables which you would <<lcDefArticle>>n merge... but <<lcDefArticle>> principle is <<lcDefArticle>> same.

Today      <<padr(date(), lnWidth)>> in a <<lnWidth>> character field
Yesterday  <<padr(date()-1, lnWidth)>> in a <<lnWidth>> character field
endtext
?lcstr
See? No file.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform