RE: Am I missing something? Calculations...

2000-05-17 Thread Kelly Matthews

actually evaluate is the way I went :) 
actually i did the evaluate within CFSETS and it worked just beautifully.

 -Original Message-
 From: Josh Black [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, May 16, 2000 5:11 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Am I missing something? Calculations...
 
 Why is it bad to use Evaluate() for math calculations?  Is it just a speed
 issue from having to make a function call?  It certainly returns the
 correct
 results.
 
 Josh
 
 - Original Message -
 From: "Dick Applebaum" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 16, 2000 2:03 PM
 Subject: RE: Am I missing something? Calculations...
 
 
  Um, no, don't use evaluate...
 
  Look at the CF math functions (Functions, not Tags!)
 
 cfset A = 3
 cfset B = 7
 cfset C = A / B 
 
 cfoutput
   br  A /  B = #C#
 /cfoutput
 
  HTH
 
  Dick
 
  At 2:23 PM -0400 5/16/2000, Kelly Matthews wrote:
  Ok i figured it out, use the evaluate tag...
  Kelly
  
-Original Message-
From: Kelly Matthews [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, May 16, 2000 2:11 PM
To: '[EMAIL PROTECTED]'
Subject: Am I missing something? Calculations...
  
Ok I must be missing something I have not had to do this before
so never really had to worry about it.  I want to output a report
that does a couple things 1 is it takes 2 fields (field a and field
 b)
and divides them. I know how to do it in the SQL statement but I
 dont
 want
to I would rather do it on output.  I couldnt find any DIVIDE
 function
 in
CF.  So how would i do fielda/fieldb and have it output the RESULT.
  
Then I want to do the same thing but take airport1.fielda and
airport2.fielda and to the
AVERAGE of the 2.  Meaning airport1.fielda * airport2.fielda / 2.
Any suggestions on the CF syntax to make this output properly?
  
  
 Kelly
 
 --
 
  Archives: http://www.eGroups.com/list/cf-talk
  To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
 send a message to [EMAIL PROTECTED] with 'unsubscribe' in
 the body.
 
 
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
 send a message to [EMAIL PROTECTED] with 'unsubscribe' in
 the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Am I missing something? Calculations...

2000-05-17 Thread Kelly Matthews



 -Original Message-
 From: Josh Black [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, May 16, 2000 5:11 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Am I missing something? Calculations...
 
 Why is it bad to use Evaluate() for math calculations?  Is it just a speed
 issue from having to make a function call?  It certainly returns the
 correct
 results.
 
 Josh
 
 - Original Message -
 From: "Dick Applebaum" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, May 16, 2000 2:03 PM
 Subject: RE: Am I missing something? Calculations...
 
 
  Um, no, don't use evaluate...
 
  Look at the CF math functions (Functions, not Tags!)
 
 cfset A = 3
 cfset B = 7
 cfset C = A / B 
 
 cfoutput
   br  A /  B = #C#
 /cfoutput
 
  HTH
 
  Dick
 
  At 2:23 PM -0400 5/16/2000, Kelly Matthews wrote:
  Ok i figured it out, use the evaluate tag...
  Kelly
  
-Original Message-
From: Kelly Matthews [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, May 16, 2000 2:11 PM
To: '[EMAIL PROTECTED]'
Subject: Am I missing something? Calculations...
  
Ok I must be missing something I have not had to do this before
so never really had to worry about it.  I want to output a report
that does a couple things 1 is it takes 2 fields (field a and field
 b)
and divides them. I know how to do it in the SQL statement but I
 dont
 want
to I would rather do it on output.  I couldnt find any DIVIDE
 function
 in
CF.  So how would i do fielda/fieldb and have it output the RESULT.
  
Then I want to do the same thing but take airport1.fielda and
airport2.fielda and to the
AVERAGE of the 2.  Meaning airport1.fielda * airport2.fielda / 2.
Any suggestions on the CF syntax to make this output properly?
  
  
 Kelly
 
 --
 
  Archives: http://www.eGroups.com/list/cf-talk
  To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
 send a message to [EMAIL PROTECTED] with 'unsubscribe' in
 the body.
 
 
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
 send a message to [EMAIL PROTECTED] with 'unsubscribe' in
 the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Am I missing something? Calculations...

2000-05-16 Thread Kelly Matthews

Ok i figured it out, use the evaluate tag...
Kelly

 -Original Message-
 From: Kelly Matthews [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, May 16, 2000 2:11 PM
 To:   '[EMAIL PROTECTED]'
 Subject:  Am I missing something? Calculations...
 
 Ok I must be missing something I have not had to do this before
 so never really had to worry about it.  I want to output a report
 that does a couple things 1 is it takes 2 fields (field a and field b)
 and divides them. I know how to do it in the SQL statement but I dont want
 to I would rather do it on output.  I couldnt find any DIVIDE function in
 CF.  So how would i do fielda/fieldb and have it output the RESULT.
 
 Then I want to do the same thing but take airport1.fielda and
 airport2.fielda and to the
 AVERAGE of the 2.  Meaning airport1.fielda * airport2.fielda / 2.
 Any suggestions on the CF syntax to make this output properly?
 
 Kelly
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
 send a message to [EMAIL PROTECTED] with 'unsubscribe' in
 the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Am I missing something? Calculations...

2000-05-16 Thread Dick Applebaum

Um, no, don't use evaluate...

Look at the CF math functions (Functions, not Tags!)

   cfset A = 3
   cfset B = 7
   cfset C = A / B 

   cfoutput
 br  A /  B = #C#
   /cfoutput

HTH

Dick

At 2:23 PM -0400 5/16/2000, Kelly Matthews wrote:
Ok i figured it out, use the evaluate tag...
Kelly

  -Original Message-
  From:   Kelly Matthews [SMTP:[EMAIL PROTECTED]]
  Sent:   Tuesday, May 16, 2000 2:11 PM
  To: '[EMAIL PROTECTED]'
  Subject:Am I missing something? Calculations...

  Ok I must be missing something I have not had to do this before
  so never really had to worry about it.  I want to output a report
  that does a couple things 1 is it takes 2 fields (field a and field b)
  and divides them. I know how to do it in the SQL statement but I dont want
  to I would rather do it on output.  I couldnt find any DIVIDE function in
  CF.  So how would i do fielda/fieldb and have it output the RESULT.

  Then I want to do the same thing but take airport1.fielda and
  airport2.fielda and to the
  AVERAGE of the 2.  Meaning airport1.fielda * airport2.fielda / 2.
  Any suggestions on the CF syntax to make this output properly?


   Kelly
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Am I missing something? Calculations...

2000-05-16 Thread Josh Black

Why is it bad to use Evaluate() for math calculations?  Is it just a speed
issue from having to make a function call?  It certainly returns the correct
results.

Josh

- Original Message -
From: "Dick Applebaum" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 16, 2000 2:03 PM
Subject: RE: Am I missing something? Calculations...


 Um, no, don't use evaluate...

 Look at the CF math functions (Functions, not Tags!)

cfset A = 3
cfset B = 7
cfset C = A / B 

cfoutput
  br  A /  B = #C#
/cfoutput

 HTH

 Dick

 At 2:23 PM -0400 5/16/2000, Kelly Matthews wrote:
 Ok i figured it out, use the evaluate tag...
 Kelly
 
   -Original Message-
   From: Kelly Matthews [SMTP:[EMAIL PROTECTED]]
   Sent: Tuesday, May 16, 2000 2:11 PM
   To: '[EMAIL PROTECTED]'
   Subject: Am I missing something? Calculations...
 
   Ok I must be missing something I have not had to do this before
   so never really had to worry about it.  I want to output a report
   that does a couple things 1 is it takes 2 fields (field a and field b)
   and divides them. I know how to do it in the SQL statement but I dont
want
   to I would rather do it on output.  I couldnt find any DIVIDE function
in
   CF.  So how would i do fielda/fieldb and have it output the RESULT.
 
   Then I want to do the same thing but take airport1.fielda and
   airport2.fielda and to the
   AVERAGE of the 2.  Meaning airport1.fielda * airport2.fielda / 2.
   Any suggestions on the CF syntax to make this output properly?
 
 
Kelly
 --

 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Am I missing something? Calculations...

2000-05-16 Thread Larry Juncker

This works exactly as you are asking for:

   cfset A = 3
   cfset B = 7
   cfset C = A / B 

   cfoutput
 br  #A# / #B# = #NumberFormat(C, ".99")#
   /cfoutput

   cfset D = 3
   cfset E = 7
   cfset F = (D * E)/2 

   cfoutput
 br  (#D# *  #E#) / 2 = #NumberFormat(F, ".99")#
   /cfoutput

Try it out!

-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 16, 2000 4:03 PM
To: [EMAIL PROTECTED]
Subject: RE: Am I missing something? Calculations...


Um, no, don't use evaluate...

Look at the CF math functions (Functions, not Tags!)

   cfset A = 3
   cfset B = 7
   cfset C = A / B 

   cfoutput
 br  A /  B = #C#
   /cfoutput

HTH

Dick

At 2:23 PM -0400 5/16/2000, Kelly Matthews wrote:
Ok i figured it out, use the evaluate tag...
Kelly

  -Original Message-
  From:   Kelly Matthews [SMTP:[EMAIL PROTECTED]]
  Sent:   Tuesday, May 16, 2000 2:11 PM
  To: '[EMAIL PROTECTED]'
  Subject:Am I missing something? Calculations...

  Ok I must be missing something I have not had to do this before
  so never really had to worry about it.  I want to output a report
  that does a couple things 1 is it takes 2 fields (field a and field b)
  and divides them. I know how to do it in the SQL statement but I dont
want
  to I would rather do it on output.  I couldnt find any DIVIDE function
in
  CF.  So how would i do fielda/fieldb and have it output the RESULT.

  Then I want to do the same thing but take airport1.fielda and
  airport2.fielda and to the
  AVERAGE of the 2.  Meaning airport1.fielda * airport2.fielda / 2.
  Any suggestions on the CF syntax to make this output properly?


   Kelly

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Am I missing something? Calculations...

2000-05-16 Thread Mary Jo Sminkey


   Then I want to do the same thing but take airport1.fielda and
   airport2.fielda and to the
   AVERAGE of the 2.  Meaning airport1.fielda * airport2.fielda / 2.

Wouldn't the average be the two values ADDED not multiplied?

But yes, Evaluate should work fine for this.



Mary Jo Sminkey [EMAIL PROTECTED]
http://www.cfwebstore.com

CFWebstore, Cold Fusion-based E-commerce



--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.