Long Variable Name as Array Element#
Scott Walker
scottw1 at alltel.net
Mon Aug 16 19:30:02 PDT 2004
> -----Original Message-----
> From: Kenneth Brody [mailto:kenbrody at bestweb.net]
> Sent: Monday, August 16, 2004 10:11 PM
> To: Scott Walker
> Cc: Filepro List - No spam
> Subject: Re: Long Variable Name as Array Element#
>
>
> Scott Walker wrote:
> >
> > Can you use a Long Variable name as an array element.
>
> Yes.
>
> > I can't seem to on 5.0.13 rclerk.
>
> Define "can't seem to".
>
>
Real simple:
dim Redhat_Sell[6](12,,2):aa
declare Cust_Type(1,*)
Cust_Type=order_file(82) 'Will be a value of 1 - 6
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"
If I change it to this:
dim Redhat_Sell[6](12,,2):aa
ty(1,*)
ty=order_file(82)
Redhat_Sell[ty]=Redhat_Sell[ty]+8
It works like a champ.
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