Hi, Doug:

Thanks, I will check it out later. 

If anyone knows on-line about this, it will be very grateful.

Mei

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 11:49 AM
To: CF-Talk
Subject: RE: loop in <CFSCript>


Mei,

Chapter 18 of "Advanced cf app development" (Ben Forta) is all about cf
scripting.

Available at fine booksellers everywhere.  ;-)


Douglas Malcolm


-----Original Message-----
From: Zhou, Mei Y (Mei) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 8:29 AM
To: CF-Talk
Subject: RE: loop in <CFSCript>


James:

It works !! many thanks.

By the way, do you have any resource for syntax within <CFScript>?
according to CF documentation, it just mention it is similar to
JavaScript, no more further resource found.

Thanks again.

Mei

-----Original Message-----
From: James Lawrence [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 11:13 AM
To: CF-Talk
Subject: RE: loop in <CFSCript>


Mei, try :

arrayYes=Arraynew(1);
for (x=1;x LTE varLength; x = x+1) {
        arrayYes[x] = (#SomeNum[k]#/#othernum[k]#)*100;
}

The increment needs to be x=x+1 - x++ doesn't work.

Cheers

James Lawrence,  Application Developer, Freeserve Plc
The Observatory, 36-41 Clerkenwell Close, London EC1R OAU
T: 0207 5534832, M: 0797 1024911, F: 0207 5534866


-----Original Message-----
From: Zhou, Mei Y (Mei) [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 16:02
To: CF-Talk
Subject: RE: loop in <CFSCript>


It won't work, besides, for CF, array start with 1 not 0.

Thanks though.

Mei

-----Original Message-----
From: Jason Lees (National Express)
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 10:45 AM
To: CF-Talk
Subject: RE: loop in <CFSCript>



cant you use a
<cfscript>
arrayYes=Arraynew(1);
for (k=0;k lte varlength;k++)
        arrayYes[k]=(#SomeNum[k]#/#othernum[k]#)*100;
</cfscript>




Jason Lees
National Express
Email : [EMAIL PROTECTED]


-----Original Message-----
From: Zhou, Mei Y (Mei) [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 15:33
To: CF-Talk
Subject: loop in <CFSCript>


Can someone please tell me where I can find the resource about how
to loop inside <CFSCript> instead of <CFLOOP>?

My problem is:

I have use the combination of
<CFScript>
    arrayYes = ArrayNew(1);
</CFScript>
<CFLOOP  from= 1 to = #varLength# Index="k">
  <CFSET arrayYes[k] = ( #someNum[k]# / #otherNum[k]# )* 100 )>
</CFLOOP>

// someNum and otherNum has been defined and assigned values in the same
pages
   before with template, but when I run it, it says: can not convert
number...

// when I look up CF book, it says, <CFSET can not do much
calculation...need
   to be careful....

Many Thanks.

Mei
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to