Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!watmath!xenitec!timk From: timk@xenitec.uucp (Tim Kuehn) Newsgroups: comp.databases Subject: Re: Invalid Subscript Reference in Fox: Bug or Feature? Summary: F-base can't find the function Keywords: FoxBASE UDF macro Message-ID: <1989Jul24.143554.4172@xenitec.uucp> Date: 24 Jul 89 14:35:54 GMT Reply-To: timk@xenitec.UUCP (Tim Kuehn) Organization: Xenitec Consulting Services, Kitchener, ON Lines: 35 In article <9563@phoenix.Princeton.EDU> englandr@phoenix.Princeton.EDU (Scott Englander) writes: >I'm trying to include references to functions in statements in a FoxBASE >/Mac program, and i think Fox is seeing them as arrays, for some reason. > >Case 1: >replace next (r2-r1) tr2comb with tr2fit() for tr2 <> -99 .and. correlates() > >Here, tr2fit() and correlates() are UDF's in the same file as the >program. This line gives the error message "Invalid Subscript >Reference" when used in a program or on the command line. What this means is that f-base can't find one of your functions, and since the function has the "()" after the keyword it's assuming it's a array instead of a function. A word of caution here! Even thought the F-base dox say you can have procedure names up to 10 chars long, only use 8 chars for your procedure names. I've been nailed by making calls to procedures with names that long and f-base said that it either didn't exist (and gave the subscript problem) or got it confused with another function with the same first 8 chars. Feature or bug, I never use more than 8 chars for this reason. ... rest of post deleted ... >-- > > - Scott +-----------------------------------------------------------------------------+ |Timothy D. Kuehn timk@xenitec | |TDK Consulting Services !watmath!xenitec!timk | |871 Victoria St. North, Suite 217A | |Kitchener, Ontario, Canada N2B 3S4 (519)-741-3623 | |DOS/Xenix - SW/HW. uC, uP, DBMS. Satisfaction Gauranteed| +-----------------------------------------------------------------------------+