I was asked to display financial calculations. It requires embedded
loops and I've been spinning my wheels on this project.
The first task is to keep going through a loop until one reaches an
inputted number.
EX: The mortgage will be paid off in [ 36 ] months.
So the loop is
<cfloop from="1" to="#totalMonths#" index="somethingAppropriate">
</cfloop>
Inside this loop there are several calculations. If at the end of
#totalMonths# one of the calculations isn't equal to 0 (or another
inputted number designated as p1) the loop has to be done again.
So, inside loop (same as above)
<cfloop from="1" to="#totalMonths#" index="somethingAppropriate">
<cfset p1=p1-myIndex>
.
#p1#
</cfloop>
<cfif p1 GT "1" > // If p1 doesn't equal 0 do again.
<cfloop from="1" to="#totalMonths#" index="somethingAppropriate">
<cfset p1=p1-myIndex>
.
#p1#
</cfloop>
</cfif>
I hope this was understandable.
Thx
gil
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210918
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