
Сообщение от
Ped7g
those trailing spaces due to comment shouldn't happen since v1.18.2, so you are probably at older version of sjasmplus?
nop. SjASMPlus Z80 Cross-Assembler v1.18.3
I think it physically cannot detect trailing spaces, since the text in this case is not in quotes.

Сообщение от
Ped7g
It makes things easier when you specify version of sjasmplus when reporting some issue.
Well, this is not really an issue, rather a flaw.

Сообщение от
Ped7g
You can also trim/add quotes in lua script, but I never remember lua syntax from head, so I would have to google the lua tutorials to find the string operators and how to do it.
Well, I'll keep in mind. But in this situation, it is easier to move the comment to another line.

Сообщение от
Ped7g
There also does exist:
Код:
--outprefix=<path> Prefix for save/output/.. filenames in directives
It's not super smart and it can break quite easily too but it may cover some use cases, so in your case something like `--outprefix=/dir1/dir2/dir3/` would affect the `SAVEBIN appName` from first post (notice the trailing slash in the option). But it would affect also many other output commands, so not sure if this is helpful in your case.
As a single solution yes, but I have a multi-assembly and may have different paths and filenames.

Сообщение от
Ped7g
Let me know if I should produce some lua example doing also the quotes stripping/adding, maybe I even have it somewhere in tests, I think I recall something like that, but I'm not sure.
Okay, I'll try to implement this solution.
It would be very nice to get closer interaction between variables inside a macro and the results of LUA execution.
- - - Добавлено - - -
Есть ещё вопрос по макросам. Как получить длину передаваемой строки внутри макроса?
Например:
Код:
print "Loooooooong text string!"
MACRO print text
вот чему тут равна длина строки text?
ENDM
Длину строки можно получить с помощью LUA:
string.len(text)
Но как получить доступ к переменной макроса?
Можно было бы временно сохранить с помощью:
DEFINE text_ text
и уже внутри LUA достучаться:
sj.get_define("text_")
но вместо значения переменной text, мы получаем просто слово «text».
Чёт прям замкнутый круг какой-то. Может есть какой-то спецсимволы, что бы передать значение?