Re: more sequence help

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Fri, 18 Feb 2000 16:11:07 -0600, Paul Sheepwash wrote:

>here is what I am trying to do
>
>supplierfname= open(sname & ".dat", "w")
>
>        printf( supplierfname, "%s", {supplierdata} )
>
>        close(supplierfname)
>
>what am I doing wrong?  I want to save this sequence into a file and it
keeps giving me errors?

If supplierdata is a sequence, then you need to write each element
individually.  One possible way to do this would be:

for i = 1 to length( supplierdata ) do
  printf( supplierfname, "%s ", {supplierdata[i]} )
end for
close(supplierfname)

Or, if you know the length of supplier data (let's say it has 4 elements)
then you could do:

printf( supplierfname, "%s %s %s %s", {supplierdata} )
close(supplierfname)

-- Brian

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu