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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to