export ascii

Kenneth Brody kenbrody at bestweb.net
Wed Apr 13 13:01:13 PDT 2005


Quoting Enrique Arredondo (Wed, 13 Apr 2005 12:41:42 -0700 (PDT)):

> Hi ,
>
> What is the procedure to make export ascii write several times into the
> ascii file within the same record ?
>
> that is :
>
> export ascii tot=("file.txt") r=\n
> then :    tot(1)="bla bla bla"   ' first line I want to be created
> then :    tot(1)="THIS IS a SECOND LINE"
> then :    ......etc
>
> Should I do  : goto export line or should I do a "write" between lines ?

That won't create multiple exports any more than doing a single lookup
free and assigning to field 1 more than once will.  You need to execute
the export multiple times in order to export multiple records:

    gosub do_exp ; tot[1] = "bla bla bla"
    gosub do_exp ; tot[1] = "This is a second line"
    ... etc ...

  do_exp:
    export ascii tot = file.txt r=\n
    return

Note, however, that I would stay away from using a name such as "tot",
which is a function name in filePro.  In this case, it is unambiguous,
as tot() cannot appear as an lvalue.  However, if this were an import
rather than an export, this would be ambiguous:

    xx = tot(1)

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list