-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler incorrectly treats string literals with some characters #66
Comments
Compiler can't replace spaces with underscores as this changes the content and may break the logic this string is for. "Hello world" and "Hello_world" are two different string literals. Can you provide a real code that does not compile? Spaces in string literals should not cause compilation issues. |
I see that using "extended" params in classes may cause compilation issue: e.g. this code works
but this does not
Is this the same issue that you experience? |
YES!!! I thought it was for something else... |
@x87 Yes I know... after sending the proposal I had remembered that program. I configured it, I tested it, it worked, and finally, I forgot to edit the footer of the message... sorry... but there was also something else he wanted to say to you and he didn't remember it.
😀 |
Absolutely, read my proposal here |
Related issue: compiler replaces comma in string literals with whitespace:
after decompilation becomes
|
But the comma(
--------- ⬇ when compiling ---------
--------- ⬇ when decompiling-------
|
@MatiDragon-YT why closing this issue? it has not been resolved yet. |
@x87 forgive me. The IDE interprets commas ( Exam.ple("a, b c d") // compiled to "a b c d"
XXXX: "a, b c d") // compiled to "a, b c d" The equality/assignment symbol ( Exam.ple("abcd", "hi = hola") // error
XXXX: "abcd" "hi = hola") // nice When the IDE comes across an OPCODE that contains a function like REST / CALLBACK ( Memory.CallFunction(0@, 1@, 2@, 3@) becomes this: Memory.CallFunction(0@, 1@, 2@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@, 3@) There are times when it does not copy the last value, but 2 values at the same time. ; example
CallFunction, 0AA5,0,0, ("address% i" "numParams% i" "pop% r") |
@MatiDragon-YT it happens as internally sanny unwraps to handle this behavior |
@MatiDragon-YT I think the second issue you described warrants its own ticket. Let's keep this one for string parsing. |
Depending on how an OP is configured in the Text.AddLabel("Hello", " Word !")
stringVar = String.Format("%d * %d %c", 4, 10, charSame)
String.Scan(stringVar, "%d * %d", numParams, 1@, 2@)
Text.PrintHelpString("Performing addition...")
//to
Text.AddLabel("Hello", " Word !")
String.Format(3@v, "%d*%d", 4, 10)
String.Scan(3@v, "%d * %d", 0@, 1@, 2@)
Text.PrintHelpString("Performing addition...") I share my classes.db and others so you can check it out. |
should not delete spaces |
fixed in 4.0.0 |
In the past I remembered that the IDE compiled the strings, but eliminating the spaces, and now it does not compile them directly. So you asked me. Wasn't it better to replace the spaces with another character? It was there when I started to investigate the archive
.SCM
, and I noticed that the spaces were replaced by the underscores when decompiling. So, could the same function be done for compilation of the scripts, and thus avoid this problem?--------- ⬇ when compiling ---------
--------- ⬇ when decompiling-------
and another thing ... since the F11 does not have any function in the editor, other than deleting the field of the Opcodes Finder. Could you assign it to open the offline help file (.chm)? yes? please...
The text was updated successfully, but these errors were encountered: