Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting a text file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00230189
Message ID:
00230914
Views:
23
Oops! The UT messed up my sample. The syntax should have been:

SET TEXTMERGE TO
SET TEXTMERGE ON

*setup logic

\**ALLTRIM(Field1)**

*shutdown logic

SET TEXTMERGE TO
SET TEXTMERGE OFF SHOW

Because the UT is trying to interpret the two left/right angle brackets, it truncated my message. Substitute a double left/right angle brackets for the double asterisks in my example.

Sheesh. LOL

Scott


>You could look at the functions fcreate(), fputs(), fclose(), etc.
>
>Joe
>
>>The contents of expression ALLTRIM(field1) is "info 01 ABCD". If I send this expression to a text file by the code: SELECT ALLTRIM (field1) FROM table1 TO FILE myfile PLAIN, it places "info 01 ABCD" into the text file but with unwanted spaces before and after. What I need is the exact expression "info 01 ABCD", a carriage return and no empty spaces after. For example if I send four ALLTRIM(field1)’s to the text file one after the other it will be formatted as
>>
>>info 01 ABCD
>>info 01 ABCD
>>info 01 ABCD
>>info 01 ABCD
>>
>>Is this possible? Can I control formatting in a text file to that extent?
Scott D. Grabo
Chief Information Officer
Occupational Health Group
First Advantage Corporation
Previous
Reply
Map
View

Click here to load this message in the networking platform