MathGroup Archive 2007

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

Search the Archive

Module in a package

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72945] Module in a package
  • From: "Miguel" <mibelair at hotmail.com>
  • Date: Fri, 26 Jan 2007 06:26:27 -0500 (EST)

When I use Module in a package Mathematica yields an error message and
I d'ont understand the reason.
 This is an example

Package Calor`Combustion`

CO2[c_,h_,o_]:=(
Module[{nci=(c*10/12),nhi=(h*10/2),noi=(o*10/32),a,b,c,d,e},
nc=nci;
nh=nhi-(2*noi);
no=nc+(nh/2);
2*no+5*nh
]


Notebook:

In[21]:=
CO2[60,35,5]
>From In[21]:=
\!\(\*FormBox[
  RowBox[{\(Module::"lvsym"\), \(\(:\)\(\ \)\), "\<\"Local variable \
specification
\\!\\(TraditionalForm\\`\\({\\(\\(Calor`Combustion`Private`nci \
= \\(60\\\\ 10\\)\\/12\\)\\), \\(\\(\[LeftSkeleton] 6
\[RightSkeleton]\\)\\), \
Calor`Combustion`Private`e}\\)\\) contains
\\!\\(TraditionalForm\\`60\\) \
which is not a symbol or an assignment to a symbol. \
\\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\",
ButtonStyle->\\\"RefGuideLinkText\
\\\", ButtonFrame->None, ButtonData:>\\\"Module::lvsym\\\"]\\)\"\>"}],
\
TraditionalForm]\)
Out[21]=
\!\(TraditionalForm\`Module[{Calor`Combustion`Private`nci = \(60\
10\)\/12,
      Calor`Combustion`Private`nhi = \(35\ 10\)\/2,
      Calor`Combustion`Private`noi = \(5\ 10\)\/32,
      Calor`Combustion`Private`a, Calor`Combustion`Private`b, 60,
      Calor`Combustion`Private`d, Calor`Combustion`Private`e},
    Calor`Combustion`Private`nc = Calor`Combustion`Private`nci;
    Calor`Combustion`Private`nh =
      Calor`Combustion`Private`nhi - 2\ Calor`Combustion`Private`noi;
    Calor`Combustion`Private`no =
      Calor`Combustion`Private`nc + Calor`Combustion`Private`nh\/2;
    5\ Calor`Combustion`Private`nh + 2\ Calor`Combustion`Private`no]\)

Can you help me?. Thanks


  • Prev by Date: Re: How to find the index of a maximal element in a list?
  • Next by Date: Re: Using open brackets
  • Previous by thread: Re: can't InstallJava[] on Linux-x86-64 to Import an xls file
  • Next by thread: Re: Module in a package