: Thursday, October 04, 2007 1:21 AM
To: CF-Talk
Subject: Re: Next lowest number from array (or list).
That was kind of my point. Pound signs within IF/ELSE/ELSEIF
statements are wholly unnecessary and are, to me at least, somewhat
indicative of a person who doesn't understand how ColdFusion processes
:[EMAIL PROTECTED]
Sent: Thursday, October 04, 2007 1:21 AM
To: CF-Talk
Subject: Re: Next lowest number from array (or list).
That was kind of my point. Pound signs within IF/ELSE/ELSEIF
statements are wholly unnecessary and are, to me at least, somewhat
indicative of a person who doesn't understand
Fraser
http://learncf.com
-Original Message-
From: Asha K S [mailto:[EMAIL PROTECTED]
Sent: Thursday, 4 October 2007 4:59 PM
To: CF-Talk
Subject: RE: Next lowest number from array (or list).
Hey thanks a lot for correcting I have just started learning. And one
more thing
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 02, 2007 10:09 PM
To: CF-Talk
Subject: RE: Next lowest number from array (or list).
cfset myList = 32,48,64,72,144,160,200,288,320,400,512,576,640,720,800
cfoutput#getNextLowest(myList, 12)#/cfoutput
cffunction name=getNextLowest returntype=numeric
.
-Original Message-
From: William Seiter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 03, 2007 1:04 PM
To: CF-Talk
Subject: RE: Next lowest number from array (or list).
Depending on deployment and expected usage, I would suggest adding an
'if'
statement around the loop to Dale's code in order
Jayesh Viradiya would like to recall the message, Next lowest number from
array (or list)..
~|
Enterprise web applications, build robust, secure
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next
Jayesh Viradiya would like to recall the message, Next lowest number from
array (or list)..
~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion
, October 03, 2007 5:54 AM
To: CF-Talk
Subject: RE: Next lowest number from array (or list).
Another solution could be
Here value would be input from the user.
cfset l=32,48,64,72,144,160,200,288,320,400,512,576,640,720,800
cfset len=#ListLen(l)#
cfif #value# LT 32
cfset res=32
cfelseif #value# GT
Subject: RE: Next lowest number from array (or list).
Hey Good Asha...One suggestion would be to add Adobe CF Team in your
signature. Let CF community know that CF India Team is doing good in
participating in public ForumsIt helps increase their faith in us.
-Original Message-
From: Asha K
in
participating in public ForumsIt helps increase their faith in us.
-Original Message-
From: Asha K S [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 03, 2007 5:54 AM
To: CF-Talk
Subject: RE: Next lowest number from array (or list).
Another solution could be
Here value would
them on the screen. You can try
removing them from the code given by Asha.
-Original Message-
From: Patti Lee [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 03, 2007 12:10 PM
To: CF-Talk
Subject: Re: Next lowest number from array (or list).
My faith would be even more increased
hah
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Jayesh Viradiya [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 03, 2007 3:03 PM
To: CF-Talk
Subject: Recall: Next lowest number from array (or list).
Jayesh Viradiya would
That was kind of my point. Pound signs within IF/ELSE/ELSEIF
statements are wholly unnecessary and are, to me at least, somewhat
indicative of a person who doesn't understand how ColdFusion processes
variables. Not meant as harshly as it sounds, I promise, but might be
a useful thing to remember
Message-
From: Patti Lee [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 03, 2007 12:51 PM
To: CF-Talk
Subject: Re: Next lowest number from array (or list).
That was kind of my point. Pound signs within IF/ELSE/ELSEIF
statements are wholly unnecessary and are, to me at least, somewhat
Say that I have a list of allowed nmbers:
32,48,64,72,144,160,200,288,320,400,512,576,640,720,800
If I give the user the option of selecting a number, and it happens to not be
in this list, how might I go about automagically selecting the next lowest
number? One exception being if the user
cfset input = 100 /
cfset last = listFirst(numbers) /
cfloop list=#numbers# index=num
cfif num GT input
cfbreak /
/cfif
cfset last = num /
/cfloop
#last#
I didn't test that code, but it should work, subject to correcting any
fat fingering on my part.
cheers,
barneyb
On 10/2/07, Andy
Andy Matthews wrote:
Say that I have a list of allowed nmbers:
32,48,64,72,144,160,200,288,320,400,512,576,640,720,800
maybe this:
cfscript
lowerLimit=32;
findThis=100;
if (findThis lowerLimit) {
thisList=listToArray(32,48,64,72,144,160,200,288,320,400,512,576,640,720,800);
On 10/2/07, Andy Matthews [EMAIL PROTECTED] wrote:
Say that I have a list of allowed nmbers:
32,48,64,72,144,160,200,288,320,400,512,576,640,720,800
If I give the user the option of selecting a number, and it happens to not be
in this list, how might I go about automagically selecting the
local.return /
/cffunction
Regards
Dale Fraser
http://learncf.com
-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 3 October 2007 3:20 PM
To: CF-Talk
Subject: Next lowest number from array (or list).
Say that I have a list of allowed nmbers
19 matches
Mail list logo