Wish: an XY-routine to tell state of a var
Posted: 06 May 2023 13:03
High Don! Once you said "I read everything". (I'd understand if it has changed.)
So a wish born from a question in Scripts-section:
It would be fine if we had an XY-function, that gives info about the "state" (in real it's "contents") of a variable.
There are situations, where a variable *must* have special contents, eg integer if used as an index. And there should be the ability to test it before use.
In the end it should return if the var is
array
empty
integer
float
string
and maybe, to have it "all in one" function, "undefined"
(You might have other/more ideas?)
Thanks!
So a wish born from a question in Scripts-section:
It would be fine if we had an XY-function, that gives info about the "state" (in real it's "contents") of a variable.
There are situations, where a variable *must* have special contents, eg integer if used as an index. And there should be the ability to test it before use.
In the end it should return if the var is
array
empty
integer
float
string
and maybe, to have it "all in one" function, "undefined"
(You might have other/more ideas?)
Thanks!