1 //will display 1
2*2 //will display 4
strToInt("1") //built-in functions can be called
"value is " + intToStr(42) //string results are ok too
MyScore=1000 //Assignments are ok too
@RefreshContent(Component : MyBitmap) //this syntax is ok too
InitGameLevel(4) //nice to be able to call user-defined functions during preview
Attachments
zge_evalexpression.PNG (272.85 KiB) Viewed 31587 times
rrTea wrote: ↑Tue Jul 09, 2019 12:08 pm
When the editbox is still new (immediately after launching ZGE for example) pressing cursor up brings a Division by Zero.
Edit: or cursor down
What is the number printed in the console after assigning, let's say, a value to an array cell? For example if I enter "arr_MyArray[0,0] = 0", the [0,0] in the arr_MyArray indeed becomes 0 but the console will print "4294967296".
rrTea wrote: ↑Sun Jul 31, 2022 11:50 am
What is the number printed in the console after assigning, let's say, a value to an array cell? For example if I enter "arr_MyArray[0,0] = 0", the [0,0] in the arr_MyArray indeed becomes 0 but the console will print "4294967296".
That sounds like a bug . I will make a note to look at that, but it should be unharmful and can be ignored.
It tries to log the result of every expression. If you type something like "5", or "5+5", it will print the result of that. When it is a assignment I suppose it should be the result of that assignment but instead something is incorrectly printed in this case.
Sorry I forgot to mention it in the previous post, yes other expressions work fine, like "5+5" etc (I'm using the expression evaluator quite a bit, it's very handy when I just want to check something real quick). Alright good to know it's nothing to worry about, thanks for confirming!