In the macro definition (#define/#macro), "##_" is used to indicate the dynamic addition of a line continuation character ("_"), Causes the compiler to delay parsing the line continuation.This allows multiple lines of code in the input file to be combined into a single statement. #309
+17
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type _MAP_ENTRY id As integer pA As integer End Type #macro BEGIN_ENTRIESMAP() Function _GetMapEntries() As _MAP_ENTRY Ptr Static As _MAP_ENTRY _entries(0 To ...) = { ##_ #endmacro #macro END_ENTRIESMAP() (0, 0)} Return @_entries(0) End Function #endmacro #define _INTERFACE_ENTRY(x, y) (x, y), ##_BEGIN_ENTRIESMAP()
_INTERFACE_ENTRY(1, 2)
_INTERFACE_ENTRY(3, 4)
_INTERFACE_ENTRY(5, 6)
END_ENTRIESMAP()
/' Compiler parsing results:
Function _GetMapEntries() As _MAP_ENTRY Ptr
Static As _MAP_ENTRY _entries(0 To ...) = { _
(1, 2), _
(3, 4), _
(5, 6), _
(0, 0)}
Return @_entries(0)
End Function
'/