EnglishУкраїнськаmRussian
Login/New
Topic with no new replies

JavaLIkeCalc "NULL" value for variables


Author Message
Written on: 28. 02. 2017 [15:50]
cvillegas
Claudio Villegas
Topic creator
registered since: 26.10.2016
Posts: 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.
Written on: 28. 02. 2017 [17:32]
roman
Roman Savochenko
Moderator
Contributor
Developer
registered since: 12.12.2007
Posts: 3750
"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.
Written on: 01. 03. 2017 [14:49]
cvillegas
Claudio Villegas
Topic creator
registered since: 26.10.2016
Posts: 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
Written on: 02. 03. 2017 [10:36]
roman
Roman Savochenko
Moderator
Contributor
Developer
registered since: 12.12.2007
Posts: 3750
"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.



4209