MathGroup Archive 1999

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

Search the Archive

Reading file with <<

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15515] Reading file with <<
  • From: Dan Truong <dtruong at irisa.fr>
  • Date: Mon, 18 Jan 1999 23:47:17 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

It seems like I can only open a file when I do it outside a routine,

For example:

	<<"Spec95_cc1_Amptjp.Cold.mat";

works perfectly, but:

	(* Read the input file holding cold miss data and updates missTable *)
	Clear[GetColdMiss] ;
	GetColdMiss[fileName_] := (
		Print["Opening file '", fileName, "' :"];
		<< fileName ;
		(*...*)
	);
	GetColdMiss["Spec95_cc1_Amptjp.Cold.mat"];

Doesn't ... I get the messages:

	Opening file 'Spec95_cc1_Amptjp.Cold.mat' :
	Get::noopen: Cannot open fileName

Anyone knows what's going on?

Dan-


  • Prev by Date: DVI
  • Next by Date: Save print in textfile
  • Previous by thread: DVI
  • Next by thread: Save print in textfile