[Prev][Next][Index][Thread]
Re: Definitions in statements allowed?
> From: "Gabor Greif" <gabor@mac.com>
> Subject: Definitions in statements allowed?
>
> Interestingly Gwydion Dylan dies with an internal error in both cases:
>
>
> Error : Internal compiler error: Can't fer-convert
> {<define-variable-parse> instance}
>
> Error : Internal compiler error: Can't fer-convert
> {<define-method-parse> instance}
>
>
> [Rob <- this may be your problem]
This is the one. Define method and define variable both give this problem.
The code I'm having trouble with goes similar to this:
define macro problem-definer
{ define problem ?problem-name:name ?problem-body:body end }
=> {
define method ?problem-name ()
?problem-body
end method ?problem-name;
// Add method to table
}
end macro problem-definer;
Note that the code is expanded to be inside another block, so it isn't at
the top level.
Is there anything I can do about this, other than trying to re-arrange some
fairly deep macro code to try and define functions only at the top level?
- Rob.
Follow-Ups:
References: