|
-ABS
Jan 10, 2021 5:38:08 GMT -6
Post by rosy on Jan 10, 2021 5:38:08 GMT -6
vpy=-Abs(vpy)
|
|
|
-ABS
Jan 10, 2021 15:22:50 GMT -6
Post by tbird on Jan 10, 2021 15:22:50 GMT -6
rosy is the problem that it doesn't produce a negative number? or wont compile??
It will not produce a negative number as the absolute number of any number will never be negative.
It wont compile because your attaching something onto a RC function.
vpy = -ABS(vpy) 'wont compile
vpy =- ABS(vpy) 'will compile Hope this helps.
|
|
|
-ABS
Jan 10, 2021 15:55:43 GMT -6
Post by n00b on Jan 10, 2021 15:55:43 GMT -6
rosy tbird I think both of you just discovered a very strange bug. tbird is right that RC does not currently support negating functions. You would have to multiply it by -1 to do that. But what tbird did in the second example should not compile so that is strange. rosy I am aware of the fact that you cannot negate a function or variable but it will be a while before I can get support for that in because to support that I would have to rewrite part of the parser itself. It will be supported but it probably won't happen in the next release. tbird I will look into that strange bug also.
|
|
|
-ABS
Jan 10, 2021 16:00:21 GMT -6
Post by rosy on Jan 10, 2021 16:00:21 GMT -6
As far as I remember, I have successfully used negations in other cases ...
|
|
|
-ABS
Jan 10, 2021 16:35:28 GMT -6
Post by n00b on Jan 10, 2021 16:35:28 GMT -6
I may have added support a while ago for variables. To be honest, I don't really remember every change I make in every release. I would have to look at the source code to see.
|
|
|
-ABS
Jan 10, 2021 18:14:11 GMT -6
Post by tbird on Jan 10, 2021 18:14:11 GMT -6
Interesting, good to know. It also worked with:
- Rect(0,0,30,30)
|
|