Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formatting a text file
Message
 
À
15/06/1999 16:45:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00230189
Message ID:
00230353
Vues:
23
>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?

Try this, if you're still looking for ideas:
create cursor cmemo (tempmem M)
append blank
select tablename
scan
  replace cmemo.tempmem with alltrim(tablename.field) + chr(10) additive in cmemo
endscan

select cmemo
copy memo tempmem to filename
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform