MathGroup Archive 1994

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

Search the Archive

$ $ $ $ $ $ $ $.....

  • To: MATHGROUP at yoda.physics.unc.edu
  • Subject: $ $ $ $ $ $ $ $.....
  • From: Ann M. Bell <ABELL at macc.wisc.edu>
  • Date: Mon, 11 Apr 94 12:35 CDT

Hello,
 
I was wondering if someone could tell me a little about those
dollar signs that pop up everywhere in mathematica output (usually
when the program isn't working).
 
The immediate context I'm dealing with is auxiliary functions
defined within a module: instead of
 
The particular context I'm dealing with is auxiliary functions
defined inside a module. Instead of the evaluated function I get
something like prod2$35[{2,3}], or on other occasions a function
like f[{x_,y_}] := list[[x,y]]  evaluated  f[{2,3}] will return
list[[x,y]].
 
What does it mean when a global rule for a function (ie. what
you get when you query ?f) is littered with  $'s?
 
The $'s seem to be (loosely) correlated with use of conditional
function definitions, but I can't seem to find any consistency in
the results. For example, a subroutine that worked fine yesterday
suddenly returns parts of the function definition liberally
interspersed with $'s and unevaluated variables......
 
Is the use of $'s in output and rule definitions discussed anywhere?
 
I have another small (but extremely annoying) difficulty with
my conditional functions definitions:
 
prod1[w_ /;  Length[list1[[w]] ] >= 1] := Module[{sel1,s1},
	sel1[{x_,y_}] := prodfunc[[x,y]];
	s1 = Map[sel1, list1[[w]] ];
	globalprod[[w]] = Flatten[Append[globalprod[[w]], s1 ]];
	];
prod1[w_ /; Length[list1[[w]] ] < 1] := globalprod[[w]] =
	Append[globalprod[[w]], 0];
 
returns the message
 
Part::pspec: Part specification w_ /; Length[list1[[w]]] < 1
     is neither an integer nor a list of non-zero integers.
 
After I define prod1, I map it onto a list of integers, so w
is in fact a valid part specification.....
 
 
As a matter of fact, I seem to be having a lot of problems with
conditional function definitions in general, so if people have
any hints or references, I'd be grateful....
 
Thanks,
Ann Bell
 





  • Prev by Date: jitter in a DSP system, from s to z and from z to s
  • Next by Date: Read error in Mathematica Win 2.0
  • Previous by thread: jitter in a DSP system, from s to z and from z to s
  • Next by thread: Read error in Mathematica Win 2.0