Variable Assignments
Stanley - stanlyn.com
stanley at stanlyn.com
Mon Aug 22 14:01:14 PDT 2016
Hi Kenneth,
OK, after reviewing the manual again, it did show the - dash part, however I was mapping it to a different table and all attempts errored. After your post, I tried again and got it to work. I believe the code that created the lookup name was after the fieldval() function, which caused it to fail. The code now creates the lookup alias before the fieldval() assignment and is working now.
A related question... Does filepro perform any pre-processing of the prc.* file for variable creation and instantiation, or is everything done at runtime in a serial way? If it does the serial way, then my mistake as I currently write code in a language that actually pre-processes the code creating and instantiating arrays, variables and etc. and had forgotten that fp doesn't work that way.
Thanks,
Stanley
-----Original Message-----
From: Kenneth Brody [mailto:kenbrody at spamcop.net]
Sent: Monday, August 22, 2016 11:34 AM
To: Stanley - stanlyn.com <stanley at stanlyn.com>
Subject: Re: Variable Assignments
On 8/22/2016 1:32 AM, Stanley - stanlyn.com wrote:
> Thanks Kenneth,
>
> I actually tried it and got errors. What I was missing was the "-,"
> part and the man page mentions nothing of it.
Where are you looking? I just used the online manual, and the "FIELDVAL()"
entry says:
> Syntax:
>
> Then: xx=FIELDVAL(lookupname,fieldno)
>
> "lookupname" is the name of the lookup file. Use a dash "-" to represent the current file.
> "fieldno" is an expression designating the field number for which you want the name.
--
Kenneth Brody
More information about the Filepro-list
mailing list