It's possible to block the negative input in field's?

It's possible to block the negative input in field's? - Сообщения

#1 Опубликовано: 12.09.2022 15:33:22
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 сообщений из 21 понравились пользователям.

Группа: User

Hey Guys,

It's possible to block the negative input in field's using smath viewer?
#2 Опубликовано: 14.09.2022 09:40:10
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

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 please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 14.09.2022 09:47:52
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 сообщений из 21 понравились пользователям.

Группа: User

Thanks Davide! Actually i do this, i will use an formatted label to show some message warning the user
#4 Опубликовано: 14.09.2022 10:51:57
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

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 please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Опубликовано: 14.09.2022 11:04:57
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 сообщений из 21 понравились пользователям.

Группа: User

Wow! It will be a great plugin! It can be extend the use of smath viewer in so many ways
#6 Опубликовано: 14.09.2022 15:53:11
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 сообщений из 21 понравились пользователям.

Группа: User

Wrote

Wrote

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 (10 КиБ) скачан 22 раз(а).

Composite clean negatives.

CleanNegative.PNG



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.


#7 Опубликовано: 14.09.2022 16:41:46
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 сообщений из 21 понравились пользователям.

Группа: User

Wrote

Wrote

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 (10 КиБ) скачан 21 раз(а).



Sure! The document is here:

DIMIS_219.sm (838 КиБ) скачан 32 раз(а).

The section is called "Flexão Composta" the value of Msd, for this algorithm need's to be positive.
#8 Опубликовано: 14.09.2022 16:44:08
overlord

overlord

552 сообщений из 1332 понравились пользователям.

Группа: Moderator

Wrote

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
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений