|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> I just did another test...
>
> #declare B = function{0};
> #declare B = 0;
>
> This causes the same "...#undef the function first" error-- even though the new
> B is not a function. So the error result is not specific to macros.
>
> The documentation about re-defining funtions doesn't mention this particular
> behavior. It appears that if B is first assigned to a *function*, that function
> 'legacy' is still part of B when the attempt is made to re-declare B as
> *anything* else, whether as another function or not...unless the original B is
> 'destroyed' first.
No, B is a function and you are trying to assign some value to the function B.
The undef rule applies to B as long as it is a function, and the lack of an
undef means by the time you try to assign the value 0, B is still a defined
function. No magic, just logic here.
Post a reply to this message
|
|