[thelist] CF: Deleting variables
Jeff
jeff@lists.evolt.org
Fri Oct 6 16:44:17 2000
oliver,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Oliver Lineham <oliver@lineham.co.nz>
:
: Simple CF question (I hope!). How do I delete/unset
: a variable?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
perhaps an even better question is why would you want to delete/unset a
variable?
from a rapid development perspective, using isDefined() is a very bad thing.
there are a number of difficulties that i will address at another time for
those that are interested. it has such a negative impact on rapid
development that we do not even use it here at work in our applications.
instead, you should be paraming your variable with an empty string and then
checking it's length (Len() if it will ultimately hold a non-complex value)
or checking it's data type (isStruct(), isArray(), isQuery(), etc. if it
holds a complex value).
if you need to clear the variable value (simple or complex), then simply use
a cfset to make it's value an empty string again.
just my 2¢ from building/maintaining too many cold fusion applications,
.jeff
name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff@members.evolt.org