blizzedout

isset?

4 posts in this topic

is there any way to check if the varuable is set without the var being declared and not getting an error?

1 person likes this

Share this post


Link to post
Share on other sites



There is no such function, even in the mysterious help file. According to this theme

you need to use UBound and compare it with element index if you want something like "If isset($arr[12]) Then".

If _elementExists($avArray, 11) Then
    _ArrayAdd($parArray, $avArray[11])
EndIf

Func _elementExists($array, $element)
    If $element > UBound($array)-1 Then Return False ; element is out of the array bounds
    Return True ; element is in array bounds
EndFunc

 

Share this post


Link to post
Share on other sites

@noissetfunction did you not notice this topic is 10 years old?! Rather than the help file being "mysterious" did it occur to you that a living, evolving language may have changed in all that time? In the future, please don't resurrect old threads, especially when not adding any value to the discussion.


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.