Solved

Calculations with ColdFusion

Posted on 2014-03-21
2
403 Views
Last Modified: 2014-03-21
I need to calculate some fields. first I need to sum B + C and then subject that from A. Does coldfusion support parenthesis  for things like this? Can I do, A - (B+C)? Or, Do I need to add B+C first, make it a separate variable and then subtract it from A?

Thank you!
0
Comment
Question by:earwig75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 39946408
Of course..

<cfset valueA = 4>
<cfset valueB = 10>
<cfset valueC = 15>

<cfset theResult = ValueA - (ValueB + ValueC)>
0
 
LVL 52

Expert Comment

by:_agx_
ID: 39946429
(no points, your question was already answered ... )

> Does coldfusion support parenthesis  for things like this?

Yes. Pretty much any language that supports basic arithmetic operations ie + - * / will, as parenthesis are the standard way of specifying  order of operations.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question