Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generar archivo TXT...
Message
 
 
À
16/05/2003 09:34:47
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00789194
Message ID:
00789362
Vues:
20
Tambien puedes crear los archivos con SET TEXTMERGE o TEXT TO ... ENDTEXT, me parecen opciones mas poderosas para crear archivos.
Como un pequeño ejemplo, te pongo el siguiente código.
   lcArchivo="Miarchivo.txt"
   SET TEXTMERGE ON
   SET TEXTMERGE TO (lcArchivo)
      \\Inicio de mi Archivo
      \\<<REPLICATE("*",80)
      *** Por ejemplo, recorremos la tabla de clientes
      SELECT Clientes
      SCAN
         \\Codigo Cliente: <<cCode>>
         \\Nombre: <<cName>>
         \\Direccion: <<cAddress>>
         \\Telefono: <<cPhone>>
         \\<<REPLICATE("-",80)>>
      ENDSCAN
      \\Fin de mi archivo
      \\<<REPLICATE("*",80)>>
  SET TEXTMERGE TO
  SET TEXTMERGE OFF
>Saludos.


>Desde versiones anteriores de Visual FoxPro, mi opcion para generar un archivo TXT ha sido la siguiente tecnika:
>set device to file &nomarchivo
>@1,1 say "mi primera linea"
>@2,1 say "mi segunda linea"
>set device to screen
>esto me ha funcionado muy bien, ahora me kuestiono si esta es una buena
teknika para la generacion de archivos TXT, alguien lo hace distinto?
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform