Masm may do this also - it requires the '%' operator at the beginning of a line AND the '&' operator in the quoted string. JWasm currently doesn't need the '&'.
My testcase is:
JJ, please note that I'd like to reserve priorities > 5 to regressions and crashes.
As far as this peculiar error is concerned: I understand if it's annoying, but a fix requires a change it the macro argument parser, which is planned to be changed in v2.06 anyway. So I really like to avoid double work and delay this fix to 2.06.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I see in the v2.06 history.txt
- a text macro which contained a macro function call and extra chars
might not have been expanded correctly if it was used as an argument
in one of the string directives.
That looks like you've attacked this problem. However, the macro expansion inside quoted text persists for the two examples below...
No, sorry! There is no simple word-around for this issue and the general clean-up of jwasm's expansion functionality - which was sort of planned for v2.06 - is delayed until ( hopefully ) v2.07.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Full example with echos showing repeated calls to My$()
> "Jwasm expands macros inside quoted text"
Masm may do this also - it requires the '%' operator at the beginning of a line AND the '&' operator in the quoted string. JWasm currently doesn't need the '&'.
My testcase is:
---------------------------------------------------
.386
.model flat, stdcall
TE1 equ <abc>
m1 macro text
db text
endm
m2 macro text
% db text
endm
.data
db "TE1"
db "&TE1"
m1 "TE1"
m1 "&TE1"
m2 "TE1"
m2 "&TE1" ;expands
% db "TE1"
% db "&TE1" ;expands
% m1 "TE1"
% m1 "&TE1" ;expands
% m2 "TE1"
% m2 "&TE1" ;expands
end
---------------------------------------------------
I'm not sure if this will be fixed for v2.05 final. It is no regression. May be left for v2.06 to fix.
changed priority back to 5.
JJ, please note that I'd like to reserve priorities > 5 to regressions and crashes.
As far as this peculiar error is concerned: I understand if it's annoying, but a fix requires a change it the macro argument parser, which is planned to be changed in v2.06 anyway. So I really like to avoid double work and delay this fix to 2.06.
Japheth,
I see in the v2.06 history.txt
- a text macro which contained a macro function call and extra chars
might not have been expanded correctly if it was used as an argument
in one of the string directives.
That looks like you've attacked this problem. However, the macro expansion inside quoted text persists for the two examples below...
include \masm32\MasmBasic\MasmBasic.inc ; http://www.masm32.com/board/index.php?topic=12460
Init
Let esi=Chr$("This text was should show Str", "ing$(32767, 32) in Mixed Case: String$(32767, 32)")
PrintLine esi
Dim Test$(99)
Let Test$('A')=String$(32767, 32)
Bmove Chr$("This text was bmoved into a String$(32767, 32) in Test$('A')"), Test$('A')
Inkey Test$(65)
Exit
end start
Output:
JWasm:
This text was should show String$(32767, 32) in Mixed case: ( eAx)
This text was bmoved into a ( eAx) in ( EaX)
Masm:
This text was should show String$(32767, 32) in Mixed Case: String$(32767, 32)
This text was bmoved into a String$(32767, 32) in Test$('A')
> That looks like you've attacked this problem.
No, sorry! There is no simple word-around for this issue and the general clean-up of jwasm's expansion functionality - which was sort of planned for v2.06 - is delayed until ( hopefully ) v2.07.
will be fixed in v2.08