Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2642
Posted: 10:04pm 10 Mar 2023
Copy link to clipboard
Print this post
And there is the problem. "Minus" can be a catch-all for "negative" or "subtract" but they are not quite the same. "negative" is a property of the number to which it is attached and "subtract" is an operator.
3 - 2 and 3 + -2 give the same result but - 2 and -2 are not the same. the first is two items, an operator and a number the second is just a number.
Basic ignores spaces in expressions making it ambiguous unless () are used to clarify.
zeitfest Guru Joined: 31/07/2019 Location: AustraliaPosts: 582
Posted: 12:41am 11 Mar 2023
Copy link to clipboard
Print this post
+1
Makes me wonder how to implement complex variables. I guess they have certain number of bytes for handling/storage etc, and then the math libraries cogitate on them easily enough. Probably need to define a complex number datatype ..
Not trying it though !!! Edited 2023-03-11 10:43 by zeitfest