fieldnum() problem
Bruce Easton
bruce at stn.com
Thu Aug 23 07:49:05 PDT 2018
On 8/23/18 10:32 AM, Kenneth Brody via Filepro-list wrote:
> On 8/23/2018 10:31 AM, Kenneth Brody wrote:
>> On Thu, Aug 23, 2018 at 12:15 AM Richard Kreiss via Filepro-list
>> <filepro-list at lists.celestial.com> wrote:
>> [...]
>>> then: lookup back = (backfile) r-=rn -np
>> [...]
>>> then: back(bd)=@td - Post the current date to backup record - syntax
>>> error pointing at back(bd)
>>>
>>> if:
>>> Then: back(bw)=getenv("username") - Syntax error points at (bw)
>>>
>>> Note that the syntax points to the closing ) of back().
>> [...]
>>
>> You cannot use a variable as a subscript to a lookup. Alias an array
>> to that lookup, and then use the array instead:
>>
>> dim backfile[999]:back[1]
>> ...
>> backfile[bw] = getenv("username")
>>
>
> Oops. I just realized that "backfile" was the name of the variable
> you used to store the filename. Obviously, use some other name.
Ah yes, OK.
I thought bd being uncast might cause a problem, but I realize now it
could cause a problem or unexpected results at runtime, but would not
cause a syntax check issue.
--Bruce
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the Filepro-list
mailing list