Page 1 of 1

Wish: an XY-routine to tell state of a var

Posted: 06 May 2023 13:03
by PeterH
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!

Re: Wish: an XY-routine to tell state of a var

Posted: 13 May 2023 14:06
by admin
Makes sense. :cup:

Re: Wish: an XY-routine to tell state of a var

Posted: 13 May 2023 15:18
by admin
v24.40.0004: Negative numbers don't work yet. I saw it. :)

Re: Wish: an XY-routine to tell state of a var

Posted: 13 May 2023 20:24
by Filehero
... now, let's type those buddies right from the start. Just a (lame) joke.

Helpful request and addition, thanks to both of you. :) :appl:

Re: Wish: an XY-routine to tell state of a var

Posted: 13 May 2023 22:13
by PeterH
...and a third :beer: for this and the stepping-var!

As I plan to work with it on beginning of the week, I suppose .0005 will correct the negative bug (pun intended) till then?

Re: Wish: an XY-routine to tell state of a var

Posted: 14 May 2023 08:43
by admin
Sure. :)

Re: Wish: an XY-routine to tell state of a var

Posted: 14 May 2023 11:33
by PeterH
:appl: :om: :cup:

Re: Wish: an XY-routine to tell state of a var

Posted: 15 May 2023 21:12
by PeterH
Again: used it without testing.

Only to test for integer or string.

As expected: OK!

Thanks again! :beer: