Syntax changes in latest release?

Not sure if this is a bug or not. This code has worked for years:
if($den<>0)
{
{s1} = round(($num*{r1})/$den,.5);
}
else
{{s1}=0;}
echo "den is $den zero ", “
”;

Today I noticed it hangs the process with a spinning gear. I changed it to this and it works: It seems it does not like the table variable in the calculation. Is this new?

   $rvar = {r1};
if($den<>0)
{ 
    {s1}  = round(($num*$rvar)/$den,.5);
}
   else
{{s1}=0;}
	echo "den is $den zero ", "</br>";

Can you generate the code before/after and post what the generated code is for this block?

Not sure what you mean. That is the code after I generated the app. Do you mean see the results?

Thanks

  1. Revert your custom code block back to how it was originally and generate the app.
  2. Then go into the folder wwwroot/scriptcase/app/project/application/ and find the file AppName_apl.php if its a form, or AppName_grid.class.php if its a grid.
  3. Copy/duplicate this file so it won’t be overwritten.
  4. In SC, update your code block again so it works as per your original post. Generate the app again.
  5. Now back in the generated code folder wwwroot/scriptcase/app/project/application/, open both files (previous copied and new) in an editor and compare differences. In theory the only difference is the change you made to the custom code.
  6. Now you can see the final code that will be executed, you can see how SC is generating it and what may be going wrong. It may be a bug, or it may be something else unusual.