variable for import field number loop

Nancy Palmquist nlp at vss3.com
Thu Mar 13 10:40:54 PDT 2008


Scott Nelson wrote:
> Is there a way to use a variable to count through the field numbers on 
> an import?  Such as
> 
> :import new = importfile r=\n f=;
> 
> :x(2,.0)="1"
> 
> :aa=new(x); gosub dothis; etc
> 
> 
> There are hundreds of fields in each line and I would prefer not to do:
> 
> if: x eq "1"
> then: aa=new(1)
> 
> and so on.
> 
> 
> Scott
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> 
Scott,

Change the logic a bit and read the entire record into one big variable by 
changing r=; to r=\n

Then just parse thru the data by looking for ; to see where each field starts 
and stops.

A bit more annoying but something that can be looped.

Nancy

-- 
Nancy Palmquist 		MOS & filePro Training Available
Virtual Software Systems	Web Based Training and Consulting	
PHONE: (412) 835-9417		   Web site:  http://www.vss3.com


More information about the Filepro-list mailing list