Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Output of long strings to text files
Message
 
À
29/10/2001 22:50:58
Jaime Vila
Miami Children's Hosp. - Radiology
Miami, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00574861
Message ID:
00574887
Vues:
20
Hi Jaime,

As others have already noted, you'll need to SET MEMOWIDTH to nnn. In VFP3 and previous FP versions, the max for nn was 256. I think it was then increased to 1024, and I know it is now (VFP6 and later) 8192. The docs do note though that for ?|?? the width will always be <= 256

The other (much underused in my opinion) command is TEXT ... ENDTEXT
local lcTextMerge
lcTextMerge = SET("TEXTMERGE")
** NOSHOW supresses the output to _SCREEN - and therefore speeds up the process a great deal
SET TEXTMERGE TO (myfile) NOSHOW
SET TEXTMERGE ON 
SCAN
  ** Output the first field on a new line
  \&lt;&lt;field1&gt;&gt;
  ** subsequent fields should be on the same line as the first
  \\&lt;&lt;field2&gt;&gt;
  \\&lt;&lt;transform(field3)&gt;&gt;
  ** ... (etc)
ENDSCAN
TEXT
Footer text goes here and is placed at the end of the text file
ENDTEXT
SET TEXTMERGE &lcTextMerge.
SET TEXTMERGE TO
HTH

Andrew

>Hello all!
>
>I'm in the process of creating some strictly formatted text files to migrate some data in fox tables to another system. The text stream generated from each record needs to be all in one line or row in the text file. I'm not able to generate the row of text correctly for some of the records. They seem to be too long and my output gets an unwanted carriage return. Can anyone tell me about the specific limitations of sending output to a text file. I'm using 'set alternate' and then generating the text stream with ? and ?? operators. Any ideas or insight would be greatly appreciated.
>
>TIA,
>
>Jaime


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform