SMath Studio Forum
»
SMath Studio
»
Questions
»
It's possible to block the negative input in field's?
Rank: Member Groups: Registered
Joined: 28/02/2022(UTC) Posts: 21 Was thanked: 2 time(s) in 2 post(s)
|
Hey Guys,
It's possible to block the negative input in field's using smath viewer?
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,710 Location: Italy Was thanked: 1378 time(s) in 902 post(s)
|
Nope, the best way to accomplish it easily is to filter the output applying abs() to the value before using it.
a:1
a:abs(a)
f(a): ... |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Member Groups: Registered
Joined: 28/02/2022(UTC) Posts: 21 Was thanked: 2 time(s) in 2 post(s)
|
Thanks Davide! Actually i do this, i will use an formatted label to show some message warning the user
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,710 Location: Italy Was thanked: 1378 time(s) in 902 post(s)
|
You are welcome. As alternative one can develop a region that translates into a TextBox control with mask/validation filters. It might be tricky depending on the filter but it is feasible. |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Member Groups: Registered
Joined: 28/02/2022(UTC) Posts: 21 Was thanked: 2 time(s) in 2 post(s)
|
Wow! It will be a great plugin! It can be extend the use of smath viewer in so many ways
|
|
|
|
Rank: Member Groups: Registered
Joined: 28/02/2022(UTC) Posts: 21 Was thanked: 2 time(s) in 2 post(s)
|
Originally Posted by: Jean Giraud Originally Posted by: Hildebrando Pereira It's possible to block the negative input in field's using smath viewer ? Pretty simple to zap negative values: 1. transform negatives to '0' 2. strip vector from '0' No need using Smath Viewer. Cheers ... Jean. Random [rnd(n)] Filter.sm (11kb) downloaded 9 time(s).Composite clean negatives. Thanks Jean, but it's not the case. I have an long application developed in Smath Studio using Smath Viewer, and some of my algorithms need's a positive input for bending moment's. For now showing a warning message, and using an absolute value work, it's not the more elegant solution, but work.
|
|
|
|
Rank: Member Groups: Registered
Joined: 28/02/2022(UTC) Posts: 21 Was thanked: 2 time(s) in 2 post(s)
|
Originally Posted by: Jean Giraud Originally Posted by: Hildebrando Pereira I have an long application developed in Smath Studio ... , and some of my algorithms need a positive input for bending moment's. The very original document at the algorithms level might help. Not my discipline, but curious. Refreshed version of the previous Filter Negatives.Jean. Random [rnd(n)] Filter.sm (11kb) downloaded 9 time(s). Sure! The document is here: DIMIS_219.sm (839kb) downloaded 15 time(s).The section is called "Flexão Composta" the value of Msd, for this algorithm need's to be positive.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
Originally Posted by: Hildebrando Pereira Thanks Jean, but it's not the case. Get use to what he do, but never bow down or surrender. He will try to hijack your topics with totally unrelated replies. Just report his irrelevant posts, mods will take care it eventually. Regards
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
It's possible to block the negative input in field's?
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.