You could probably condense it a bit using the iif function, but I can't think of anything more than that.
> -----Original Message----- > From: Andy Matthews [mailto:[EMAIL PROTECTED] > Sent: Friday, April 21, 2006 2:25 PM > > I'm rewriting my slideshow code in preperation for releasing > it publicly. > > I wondered if some of you might have input as to how to > rewrite this snippet > a little more elegantly: > > <cfset VARIABLES.totalslides = 10> > <cfset URL.slide = 4> > > <cfif URL.slide EQ 1> > <cfset VARIABLES.prev = VARIABLES.totalslides> > <cfset VARIABLES.next = 2> > <cfelseif slide EQ VARIABLES.totalslides> > <cfset VARIABLES.prev = VARIABLES.totalslides - 1> > <cfset VARIABLES.next = 1> > <cfelse> > <cfset VARIABLES.prev = slide - 1> > <cfset VARIABLES.next = slide + 1> > </cfif> > > I feel as if I should be able to condense this quite a bit, > but I'm not sure > how to go about it. The frist two variables are being set > dynamically by the > way. [INFO] -- Access Manager: This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. A2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238438 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

