[v2.0] There is a need to add IsVarRef function (similarly to already presented the Is Functions)

Propose new features and changes
vmech
Posts: 352
Joined: 25 Aug 2019, 13:03

[v2.0] There is a need to add IsVarRef function (similarly to already presented the Is Functions)

Post by vmech » 01 Dec 2022, 02:15

The introduction of such a function would be very logical, given the frequent uses of the IsTypes(Value) functions, and some of the ambiguity and confusion of usage between Is functions and Value Is Class expressions.
Please post your script code inside [code] ... [/code] block. Thank you.

lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: [v2.0] There is a need to add IsVarRef function (similarly to already presented the Is Functions)

Post by lexikos » 01 Dec 2022, 02:47

No, there is not.

There is no ambiguity or duplication between the IsXxx functions and value is Class expressions. IsVarRef would just perform a class check, which would be completely redundant.

If you believe confusion between these is common, please demonstrate. I believe the documentation is quite clear about what each does.

vmech
Posts: 352
Joined: 25 Aug 2019, 13:03

Re: [v2.0] There is a need to add IsVarRef function (similarly to already presented the Is Functions)

Post by vmech » 01 Dec 2022, 05:19

Yeah... So, it's all about the complexity of the documentation. Well, okay, since it suits everyone - so be it.
Please post your script code inside [code] ... [/code] block. Thank you.

lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: [v2.0] There is a need to add IsVarRef function (similarly to already presented the Is Functions)

Post by lexikos » 01 Dec 2022, 05:31

What complexity? Each function's documentation starts with (or consists solely of) a simple description of the function, and there is even a general overview categorizing the functions. If you have some issue with it, explain.

vmech
Posts: 352
Joined: 25 Aug 2019, 13:03

Re: [v2.0] There is a need to add IsVarRef function (similarly to already presented the Is Functions)

Post by vmech » 02 Dec 2022, 03:02

Just for information:

Code: Select all

			int		float	string	intstr	flstr	array	map		object	varref
IsArray		NA		NA		NA		NA		NA		NA		NA		NA		NA
is Array	0		0		0		0		0		1		0		0		0

IsFloat		0		1		0		0		1		0		0		0		0
is Float	0		1		0		0		0		0		0		0		0

IsInteger	1		0		0		1		0		0		0		0		0
is Integer	1		0		0		0		0		0		0		0		0

IsMap		NA		NA		NA		NA		NA		NA		NA		NA		NA
is Map		0		0		0		0		0		0		1		0		0

IsNumber	1		1		0		1		1		0		0		0		0
is Number	1		1		0		0		0		0		0		0		0

IsObject	0		0		0		0		0		1		1		1		1
is Object	0		0		0		0		0		1		1		1		0

IsString	NA		NA		NA		NA		NA		NA		NA		NA		NA
is String	0		0		1		1		1		0		0		0		0

IsVarRef	NA		NA		NA		NA		NA		NA		NA		NA		NA
is VarRef	0		0		0		0		0		0		0		0		1
Used values:

Code: Select all

[ 1234, 12.34, 'some text', '4321', '43.21', Array(), Map(), Object(), &Funcs ]
Please post your script code inside [code] ... [/code] block. Thank you.

Post Reply

Return to “Wish List”