Long Variable Name as Array Element#

Scott Walker scottw1 at alltel.net
Tue Aug 17 11:29:24 PDT 2004


John,

Actually that is quite helpful.  That tells me that it must be something
else in my prc table that I have not shown in the code snippet.  I'll do
some more testing later.


Thanks,


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 

> -----Original Message-----
> From: John Esak [mailto:john at valar.com] 
> Sent: Tuesday, August 17, 2004 10:45 AM
> To: Scott Walker
> Cc: filePro mailing list
> Subject: RE: Long Variable Name as Array Element#
> 
> 
> I know this is sort of unhelpful.. don't mean it to be... but 
> I did try your exact code snippet and it works fine on my 
> box... SCO 5.0.7 / FP 5.0.13.
> 
> John
> 
> 
> > -----Original Message-----
> > From: filepro-list-bounces+john=valar.com at lists.celestial.com
> > [mailto:filepro-list-bounces+john=valar.com at lists.celestial.com]On
> > Behalf Of Scott Walker
> > Sent: Tuesday, August 17, 2004 8:15 AM
> > To: 'Kenneth Brody'
> > Cc: fpsupport at fptech.com; Filepro List - No spam
> > Subject: RE: Long Variable Name as Array Element#
> >
> >
> >
> >
> > Scott Walker
> > RAM Systems Corp.
> > PO Box 1778
> > Davidson, NC 28036
> > Ph: (704) 896-6549
> > Fx: (704) 896-7458
> > Email:  scottw1 at alltel.net
> >
> > > -----Original Message-----
> > > From: Kenneth Brody [mailto:kenbrody at bestweb.net]
> > > Sent: Monday, August 16, 2004 10:43 PM
> > > To: Scott Walker
> > > Cc: Filepro List - No spam
> > > Subject: Re: Long Variable Name as Array Element#
> > >
> > >
> > > Scott Walker wrote:
> > > [... rclerk 5.0.13 ...]
> > > >         dim Redhat_Sell[6](12,,2):aa
> > > >         declare Cust_Type(1,*)
> > >
> > > I would use (1,.0) for clarity, but that's irrelevent to the 
> > > question at hand.
> > >
> > > >         Cust_Type=order_file(82)    'Will be a value of 1 - 6
> > >
> > > I would insert:
> > >
> > >     mesgbox "Cust_Type = '" & Cust_Type & "'"
> > >
> > > What does it show?
> > >
> > > >         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.
> > >
> > > 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.
> >
> >
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com 
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> 




More information about the Filepro-list mailing list