Announcement

Collapse
No announcement yet.

Opertions confusion in fromula

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Opertions confusion in fromula

    Hello, in formula $a=1;
    $b=2;
    $c=3;
    output\print($a-$b+$c);​ return -4

    and
    output\printLine($a+$c-$b); reurn 2

    i need a clarification please!
    Click image for larger version

Name:	image.png
Views:	81
Size:	30.4 KB
ID:	103208

  • #2
    I'll look into. You can use "($a - $b) + $c" as a workaround.
    Last edited by yuri; 02-29-2024, 11:05 AM.

    Comment


    • yuri
      yuri commented
      Editing a comment
      In our formula + operator has higher priority than -. We need to fix it in future versions. For now, just resort to parentheses.

    • zerosix
      zerosix commented
      Editing a comment
      Thank you so much, i did line by line to avoid surprises.
      $result=$a+$c;
      $result=$result-$b;
Working...
X