> MTEST2( 100 )
> MsgBox Format$( MTEST2( 100 ) )
I think MTEST2 needs to be a MACRO FUNCTION to use it in this position.
But why bother with MTEST2? Doesn't MTEST1 get you where you want to go?
Then again...
> much more code here (not single line capable)
... might be the true source of your difficulties...(Code not shown).... and if there really is "much more code" what's the relative cost of an extra PUSH/POP to use a FUNCTION instead of a MACRO?
Or, is this not a 'real' challenge, rather it is an academic/self-teaching exercise?
Announcement
Collapse
No announcement yet.
Optional macro result?
Collapse
X
-
Optional macro result?
I thought it was possible to prevent the need of a variable for a macro function?
I tried the 'SUB' style but it doesn't work for multiline macro's:
Code:Function MacroResult( ByVal nResult As Long ) As Long Function = nResult End Function Macro Function MTEST1(p1) ' much more code here (not single line capable) End Macro = MacroResult( p1 ) Macro MTEST2(p1) = MTEST1(p1)
Code:MTEST1( 100 ) MsgBox Format$( MTEST1( 100 ) )
Code:MTEST2( 100 ) MsgBox Format$( MTEST2( 100 ) )
Tags: None
Leave a comment: