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

Features wanted...
Post Reply
PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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

Post 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!

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

Makes sense. :cup:

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

v24.40.0004: Negative numbers don't work yet. I saw it. :)

Filehero
Posts: 2731
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

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

Post 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:

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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

Post 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?

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

Sure. :)

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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

Post by PeterH »

:appl: :om: :cup:

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

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

Post by PeterH »

Again: used it without testing.

Only to test for integer or string.

As expected: OK!

Thanks again! :beer:

Post Reply