Array question

Bruce Easton bruce at stn.com
Tue Mar 9 15:06:41 PST 2010


On 3/9/10 5:38 PM, Bruce Easton wrote:
>  On 3/9/10 4:53 PM, Aldridge, Inc. wrote: [..]
> > But in the present case, I want to fill 24 dummy fields, say aa-ax
> > with the contents of 24 sequential fields in a lookup file
> > beginning with field 50 there.
> >
>  [..]
> >
> > Tom Aldridge _______________________________________________
> > Filepro-list mailing list Filepro-list at lists.celestial.com
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> >
> >
>  Sure, Tom - just use two arrays:
>
>  Then: dim dummyarray(24):aa
 > Then: lookup alias=myfile  k=(key)  i=A -nx

If: not alias
Then: goto somewhr  'get-way-outta-here--can't-touch-this! (alias)

 > Then: dim lookarray(24):alias(50)
 > Then: declare idx(2,.0); idx="1" idxloo
 > If: idx le "24"
 > Then: dummyarray[idx]=lookarray[idx]; idx=idx+"1"; goto idxloo
>
>  Bruce
>

ugg--I should not have give lookup example using -nx without
testing for lookup failure.

Bruce



More information about the Filepro-list mailing list