that is correct.  i usually do that, as the only variable i don't scope are
VARIABLES variables (:))

however, there are some purists that scope everthing.

i'm just lazy is all.

Chris Olive,
DOEHRS Website Administrator 

-----Original Message-----
From: Terri Stocke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 24, 2000 10:05 AM
To: [EMAIL PROTECTED]
Subject: RE: Referring to variables


Thanks, Chris!

You could refer to it without the scope, though, right?

Ter

----Original Message Follows----
From: "Olive, Christopher M Mr NMR" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: RE: Referring to variables
Date: Thu, 24 Aug 2000 09:43:51 -0400

VARIABLES is a scope, similar to FORM and URL.  it refers to variable
created within the page.

Chris Olive,
DOEHRS Website Administrator

-----Original Message-----
From: Terri Stocke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 24, 2000 9:27 AM
To: [EMAIL PROTECTED]
Subject: Referring to variables


Okay, another "best practice" question, I guess...

I have inherited an application from someone. In going through the code, I
notice that this person refers to several variables by using
"Variables.(whatever)". I'm assuming "Variables" is a reserverd term? I
can't find any documentation on this in my reference books.

Why would one choose to reference variables by preceding it this way?
For example:

<CFDIRECTORY ACTION="List" DIRECTORY="mypath" NAME="CurrentDir">
<cfoutput>
    <CFIF #CurrentDir.Name# IS ""> <CFSET PRODUCTION="TRUE">
    <CFELSE>                      <CFSET PRODUCTION="FALSE">
    </CFIF>
</cfoutput>

<CFIF #Variables.PRODUCTION# IS "TRUE"> ... etc.

I would write the IF statement as:

<CFIF PRODUCTION IS "TRUE">... etc.

Why did this other person refer to "Variables.PRODUCTION"?  They've done
this throughout the code...

Thanks!
Terri
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
the body.

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to