SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
[SS-2300] If Statement Problem: booleans equal vs (imperial) units
Rank: Member Groups: Registered
Joined: 28/08/2013(UTC) Posts: 18 Was thanked: 2 time(s) in 2 post(s)
|
Hi All, I'm trying to write an if statement that determines capacities based on certain inputs. I've attached the sheet in question. I'm not sure if it's something on my end, but for certain fractions/values the if statement will not produce the correct value. For instance, if my tpan value is set to 3/8 inch, it will work correctly. But if I set it to 1/4 inch, it will not work correctly. test.sm (9kb) downloaded 20 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/02/2014(UTC) Posts: 67 Was thanked: 13 time(s) in 11 post(s)
|
Sometimes using units have issues. In this case, if you right click the "vw" equation, and choose fractions menu and choose fractions, it will work.
|
2 users thanked Ernesto for this useful post.
|
on 13/07/2016(UTC), on 14/07/2016(UTC)
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
I think it is related to SS-2300 (booleans vs imperial units) Edited by user 13 July 2016 09:36:13(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: uncblue But if I set it to 1/4 inch, it will not work correctly. Yes it does work correctly: it does reply the otherwise specified for any non 3/8. Forum LOGIC.sm (11kb) downloaded 12 time(s).
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 28/08/2013(UTC) Posts: 18 Was thanked: 2 time(s) in 2 post(s)
|
@Ernesto, Thanks, this seems to be working. @Davide Carpi, Yes I tested this and noticed there was no issue with Metric units. Sorry, I didn't find the bug when I searched. @Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft. See the bug report Davide linked for a better explanation.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
don't worry thank you for posting a complete bug report (description, screenshot and a file to test the bug). Good to know that there is a workaround, however I hope Andrey will fix it soon (BTW if you register in the BTS you can vote the bug to prioritize the solution) |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: uncblue @Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft. Your original specification is for returning 730 lbf/ft for 3/8. If you change for 1/4, how and why should it return 730 lbf/ft ? Smaller size has lower shear capacity. If it wouldn't be so: hair size would also be 730 lbf/ft. Your system is underdesigned for end purpose, that's my conclusion. Your unspecified 1/4 returns meaningless 1 lbf/ft. If you don't have same as me: it's a version problem
|
|
|
|
Rank: Member Groups: Registered
Joined: 28/08/2013(UTC) Posts: 18 Was thanked: 2 time(s) in 2 post(s)
|
Originally Posted by: Jean Giraud Originally Posted by: uncblue @Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft. Your original specification is for returning 730 lbf/ft for 3/8. If you change for 1/4, how and why should it return 730 lbf/ft ? Smaller size has lower shear capacity. If it wouldn't be so: hair size would also be 730 lbf/ft. Your system is underdesigned for end purpose, that's my conclusion. Your unspecified 1/4 returns meaningless 1 lbf/ft. If you don't have same as me: it's a version problem The strength values are irrelevant to the issue at hand which is the bug with input imperial units. I was trying to show the discrepancy for certain thickness input values and used the same shear strength output to explain. The reason why your if statement works is because you have removed the imperial unit issue as already mentioned. See attached screenshot and sheet. test-2016-07-13.sm (10kb) downloaded 14 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 14/10/2015(UTC) Posts: 308
Was thanked: 77 time(s) in 58 post(s)
|
It's work OK. Best Regards. Carlos test_CBG.sm (9kb) downloaded 10 time(s).
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
[SS-2300] If Statement Problem: booleans equal vs (imperial) units
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.