Re: more sequence help
- Posted by Brian Broker <bkb at CNW.COM> Feb 18, 2000
- 437 views
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