[thelist] [ASP] Empty arrays in different versions

Peter Wakeford peterwakeford at intekom.co.za
Tue Oct 14 18:31:18 CDT 2003


Josh,
here's the official MS VB scripting documentation for it below. The function
should always return false if the expression contains more than one
variable.  In the example it's a variant array (use typename() or vartype()
to determine)


Description
  Returns a Boolean value indicating whether a variable has been
initialized.
Syntax
  IsEmpty(expression)
  The expression argument can be any expression. However, because IsEmpty is
used to determine if individual variables are initialized, the expression
argument is most often a single variable name.


Remarks
  IsEmpty returns True if the variable is uninitialized, or is explicitly
set to Empty; otherwise, it returns False. False is always returned if
expression contains more than one variable.

----- Original Message ----- 
From: "Joshua Olson" <joshua at waetech.com>
To: <thelist at lists.evolt.org>
Sent: Tuesday, October 14, 2003 11:03 PM
Subject: [thelist] [ASP] Empty arrays in different versions


> Hi Gang,
>
> I tried to move some code from one machine to another and the code broke.
I
> tracked it down to what I think is a variance in ASP's implementation.  In
> some versions of ASP, it seems that the empty array returns False for
> IsEmpty even when it's truly empty.
>
> Example:
>
> Dim myarray()
>
> If IsEmpty(myarray) Then
>   Response.Write "It's Empty"
> End If
>
> I've found that on some machines the IsEmpty evaluates true, and others it
> evaluates false.
>
> Thoughts?
>
> <><><><><><><><><><>
> Joshua Olson
> Web Application Engineer
> WAE Tech Inc.
> http://www.waetech.com
> 706.210.0168
>
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
>




More information about the thelist mailing list