Long Variable Name as Array Element#

Scott Walker scottw1 at alltel.net
Tue Aug 17 18:52:58 PDT 2004


> Scott Walker wrote:
> [...]
> > > >         Cust_Type=order_file(82)    'Will be a value of 1 - 6
> > >

Ken Wrote:
> > > I would insert:
> > >
> > >     mesgbox "Cust_Type = '" & Cust_Type & "'"
> > >
> > > What does it show?
> 
> What does the above line show?



It shows that for all 10 records I am processing that the value of
Cust_Type is either "1" or "2", just as I expected it would.

> 
> > >
> > > >         Redhat_Sell[Cust_Type]=Redhat_Sell[Cust_Type]+8
> > > 'Add up Total
> > > > Sales for Customer Type
> > > >
> > > > The fourth line gives me a syntax error when I run it.  Says:
> > > >
> > > >         "A filepro error has occurred"
> > > >
> > > >         "Array Index Out of Range:  dim redhat_sell(6) 
> -- Index: 
> > > > 0"
> [...]
> > > Assuming that orderfile(82) is the same in both cases, 
> both should 
> > > work the same way and give the same results.
> > >
> > 
> > I agree, it either on should work but the one where I use the Long
> > Variable for the array element fails...everytime.    I just 
> tried to use
> > a Long_Variable with another array, and it also fails with 
> a similar 
> > error message.  I think something is broken.
> > 
> > I'm forwarding this to fp tech support.
>

> Without anyone else being able to duplicate it, I'm not sure 
> what you expect fpsupport to do.



I was hoping they were a lot smarter than me :-)


Regards,


Scott


Scott Walker
RAM Systems Corp.
PO Box 1778
Davidson, NC 28036
Ph: (704) 896-6549
Fx: (704) 896-7458
Email:  scottw1 at alltel.net 
 




More information about the Filepro-list mailing list