Re: file name as mathematica function parameter
- To: mathgroup at smc.vnet.net
- Subject: [mg5034] Re: [mg4996] file name as mathematica function parameter
- From: Andrei Constantinescu <constant at athena.polytechnique.fr>
- Date: Sat, 19 Oct 1996 16:40:36 -0400
- Sender: owner-wri-mathgroup at wolfram.com
I don't think there is any problem in doing this. You have here a
program I did some time ago:
ReadMail[ fileName_String ] :=
(
file = OpenRead[fileName];
nomail = Read[file, Number];
xmail = ReadList[file, Real, nomail] ;
ymail = ReadList[file, Real, nomail] ;
Close[file]
)
... and the hint is to use the OpenRead - command as you might
remark.
However for a List you might also try to use:
ReadList[ fileName , { Number, Number } ]
... or something close !
Andrei