declare global error
Kenneth Brody
kenbrody at spamcop.net
Wed Nov 7 07:03:35 PST 2012
On 11/6/2012 8:18 PM, Dennis Malen wrote:
> I am getting the following error:
>
> ERROR Global 'sandy' already defined.
>
> I have a call statement in @entsel.
>
> In @entsel I have a "declare extern sandy"
>
> In the call statement I have "declare global sandy(8)"
I assume you mean in the call *processing*?
> Any reason anyone can see why I would be getting an error.
>
> Sandy is not defined anywhere else in input processing.
Are you assigning a value to "sandy" in input processing prior to calling
the processing with the "declare global"? If so, that's the problem, and
you'll need to put the "declare global" in the input processing.
filePro will allow you to make the assignment to a variable that, so far,
has only been declared "extern", and gives it a tentative definition based
on that value. However, unless the value assigned to it matches the
definition in the eventual "declare global", the tentative definition and
the "real" definition in the "declare global" won't match, and you'll get
the above error. (So, in the above instance, if you were to assign an
8-character value to sandy, you wouldn't get the error. However, you'd only
be hiding the fact that there is a problem.)
--
Kenneth Brody
More information about the Filepro-list
mailing list