Reference Manual -> Advanced Keywords -> Macro : EndMacro
Somewhere on that page, there is
Example: Advanced multi-line macro
that shows Assert and two examples.
It may be a joke (on those who love to use assert) or a typo: A "Not" is missing, so the code only asserts errors
Thanks for your attention.
Macros
Moderator: Documentation Editors
- Andre
- PureBasic Team
- Posts: 2058
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: Macros
Sorry, I don't really understand (but I'm not English-native)...
This is the related example code from the help --> could you show us, how it should look like? Thanks!
This is the related example code from the help --> could you show us, how it should look like? Thanks!
Code: Select all
Macro DoubleQuote
"
EndMacro
Macro Assert(Expression)
CompilerIf #PB_Compiler_Debugger ; Only enable assert in debug mode
If Expression
Debug "Assert (Line " + #PB_Compiler_Line + "): " + DoubleQuote#Expression#DoubleQuote
EndIf
CompilerEndIf
EndMacro
Assert(10 <> 10) ; Will display nothing
Assert(10 <> 15) ; Should display the assert