УкраїнськаEnglishmRussian
Вхід/Новий
У темі немає нових постів

JavaLIkeCalc "NULL" value for variables


Автор Повідомлення
Повідомлення створено: 28. 02. 2017 [15:50]
cvillegas
Claudio Villegas
Автор теми
Зареєстрован(а) с: 26.10.2016
Повідомлення: 14

As I commented on the use of NULL values in the archiving of data in MySQL databases, I think it would be very convenient to have the definition of the standard "null" value for all types of data (variables) and that this value can be Use as "EVAL".
Having a single error value defined as NULL, would facilitate the tasks of analyzing this condition, since for all variables, regardless of its type, the value indefinite or error would be null.
Moreover, I believe that when using NULL, the particular definition of an "EVAL" for each type of data would no longer be necessary.

Attentive to your comments.
Excuse my English.
Повідомлення створено: 28. 02. 2017 [17:32]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зареєстрован(а) с: 12.12.2007
Повідомлення: 3742
"cvillegas" wrote:

As I commented on the use of NULL values in the archiving of data in MySQL databases, I think it would be very convenient to have the definition of the standard "null" value for all types of data (variables) and that this value can be Use as "EVAL".

For me that works in the way and it's all fine!

"cvillegas" wrote:

Having a single error value defined as NULL, would facilitate the tasks of analyzing this condition, since for all variables, regardless of its type, the value indefinite or error would be null.

You can do it now also by:
- comparing to the generic EVAL constant;
- comparing any type of variable to any specific one constants EVAL_BOOL, EVAL_INT, EVAL_REAL, EVAL_STR for any type indifferently;
- call a specific function isEVal() to the variable.

"cvillegas" wrote:

Moreover, I believe that when using NULL, the particular definition of an "EVAL" for each type of data would no longer be necessary.

For now I am not needed NULL here at all and EVAL is OK!

Learn, learn and learn better than work, work and work.
Повідомлення створено: 01. 03. 2017 [14:49]
cvillegas
Claudio Villegas
Автор теми
Зареєстрован(а) с: 26.10.2016
Повідомлення: 14

Thank you very much for your reply.

So according to what you tell me, is it possible to compare all types of variables with EVAL?

Could you say that the use of EVAL_INT, EVAL_REAL, EVAL_BOOL and EVAL_STR then is not necessary and can be considered simply as EVAL ?.

Considering this, in practice it is very close to what I was proposing.

OpenScada is a great big job.

Greeting
Повідомлення створено: 02. 03. 2017 [10:36]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зареєстрован(а) с: 12.12.2007
Повідомлення: 3742
"cvillegas" wrote:

So according to what you tell me, is it possible to compare all types of variables with EVAL?

Yes, it is.

"cvillegas" wrote:

Could you say that the use of EVAL_INT, EVAL_REAL, EVAL_BOOL and EVAL_STR then is not necessary and can be considered simply as EVAL ?.

Yes, you can use EVAL for the most operations, but for the compatibility and for some direct assignments the EVAL_* of the direct types are continued to be useful.

"cvillegas" wrote:

Considering this, in practice it is very close to what I was proposing.

Sure but it must be obviously for you that I do this for self then I do it optimal for mine!

Learn, learn and learn better than work, work and work.



12682