bass
bass copied to clipboard
'fill' keyword doesn't allow single quoted length
The following line fails to assemble using the latest release of bass v18.
error: mismatched quotes in expression
Video002.asm:6:1: fill $0010'1000
This has worked in the past (Dec 2019). I'm really trying to narrow this issue down and did the following research.
- VALID: origin $0000'0000
- VALID: base $8000'0000
- Error message
mismatched quotes in expressionis from bass/core/utility.cpp functionBass::split - The fill keyword uses the split function while the other mentioned keywords do not.
- The documentation isn't "conditional" for everything except 'fill' doc/basics.md regarding the use of the single quote character for making numbers easier to read.
It seems like there are a couple of different possible fixes, so I leave that up to you.
Please let me know if you need any further information.
It looks like the following code change caused the functionality change Old
if(s.match("fill ?*")) {
lstring p = s.ltrim<1>("fill ").qsplit(",").strip();
unsigned length = evaluate(p(0));
unsigned byte = evaluate(p(1, "0"));
while(length--) write(byte);
return true;
}
New
if(s.match("fill ?*")) {
auto p = split(s.trimLeft("fill ", 1L));
uint length = evaluate(p(0));
uint byte = evaluate(p(1, "0"));
while(length--) write(byte);
return true;
}