MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: what am i doing wrong?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94521] Re: [mg94485] what am i doing wrong?
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Mon, 15 Dec 2008 07:47:16 -0500 (EST)
  • References: <200812141241.HAA10411@smc.vnet.net>
  • Reply-to: drmajorbob at longhorns.com

The error message, which includes

"1304.33[cf0_,cf1_,cf2_,cf3_,cf4_,cf5_]"

tells us that npr already had a value (1304.33).

It also tells us that the tags on Real values are protected. That is, you  
can't define a function called 1304.33.

Bobby

On Sun, 14 Dec 2008 06:41:01 -0600, stpatryck <stpatryck at gmail.com> wrote:

>
>
> In[111]:= npv[cf0_, cf1_, cf2_, cf3_, cf4_, cf5_] := -(cf0) +
>    cf1*(1/((1.12)^1)) + cf2*(1/((1.12)^2)) + cf3*(1/((1.12)^3)) +
>    cf4*(1/((1.12)^4)) + cf5*(1/((1.12)^5));
>
> (* Plan A NPV *)
> npv[3600000, 0, 0, 0, 0, 7000000]
>
> SetDelayed::write: Tag Real in 1304.33[cf0_,cf1_,cf2_,cf3_,cf4_,cf5_]
> is Protected. >>
>
> Out[111]:= 1304.33[3600000, 0, 0, 0, 0, 7000000]
>



-- 
DrMajorBob at longhorns.com


  • Prev by Date: Re: what am i doing wrong?
  • Next by Date: Re: Problem with HoldForm & Unevaluated
  • Previous by thread: what am i doing wrong?
  • Next by thread: Re: what am i doing wrong?