SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
[SS-2436] Boolean Operator using Text and Numbers
Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 Location: IL Was thanked: 19 time(s) in 17 post(s)
|
Why is it that within an if statement I can use a Boolean equal sign to compare objects to a number, but if I try to compare numbers to text I get an error stating that the action could not be performed with text. See attached. Boolean Operator - Text and Number.sm (10kb) downloaded 31 time(s).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Not sure what you are looking for ?
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 Location: IL Was thanked: 19 time(s) in 17 post(s)
|
Ah yes, I should have been more specific.
It seems odd to me that the if you compare text to a number the Boolean decides that the text does not equal the number so it executes "as expected". However, if you compare a number to text there is an error thrown. Clearly the text is not the number so why not behave in the same manor?
Thanks for the response, btw.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Seems a bug to me. At first glance it happens only if the number in the comparison comes from el() and is not the first matrix element.Edited by user 26 May 2017 15:53:08(UTC)
| Reason: marked as FIXED |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Few modules in this work sheet, may be useful. Sorry : unrecorded source/originator. Jean Utilities Matrix IsArray.sm (21kb) downloaded 21 time(s).
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
[SS-2436] Boolean Operator using Text and Numbers
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.