in reply to Order of operations
In your code:
add a dummy null string at the beginning to script 2:print "(4-1) + 2+3 * (2*2) = ", (4-1) + 2+3 * (2*2), "\n\n"; #script 1 + answer 17 print (4-1) + 2+3 * (2*2);#script 2 does not work
This makes it clear that the first arg is not a file handle.print "",(4-1) + 2+3 * (2*2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Order of operations
by haukex (Archbishop) on Nov 16, 2017 at 07:42 UTC | |
by Marshall (Canon) on Nov 16, 2017 at 09:48 UTC | |
by haukex (Archbishop) on Nov 16, 2017 at 11:49 UTC |