AmiBlitz3 icon indicating copy to clipboard operation
AmiBlitz3 copied to clipboard

Bug in "Function"

Open Nju79 opened this issue 3 years ago • 1 comments

There is a bug with the parameters in functions-command. The following code print not the value 5, it prints the content at a memory addresses:

Function.b Test{@text.s} Function Return 5 End Function

NPrint Test{} End

This malfunction appears under this conditions:

  • If the optional string parameter is the only one and no string is passed
  • If another optional parameter is before the string parameter and no parameters are passed

The function works perfect if at least 1 parameter was passed. This is definitly a bug (fortunately with a workaround, when you pass a dummy parameter).

Nju79 avatar Apr 01 '21 22:04 Nju79

Nice! Lets see, what is the cause of that behaviour.

honitos avatar Apr 07 '21 08:04 honitos