Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

RE: Difference between Get[] and Copy-Past operation

  • To: mathgroup at
  • Subject: [mg32515] RE: [mg32500] Difference between Get[] and Copy-Past operation
  • From: Ariel Fligler <ariel.fligler at>
  • Date: Fri, 25 Jan 2002 02:57:44 -0500 (EST)
  • Sender: owner-wri-mathgroup at


Thanks for your reply. My file consist only of Mathematica commands, but it
seems that Mathematica can't parse it using Get[], but does digests the
contents when I copy-Paste them myself.

Any idea ?



-----Original Message-----
From: jmt [mailto:jmt at]
To: mathgroup at
Subject: [mg32515] Re: [mg32500] Difference between Get[] and Copy-Past operation

Get is used to read Mathematica expressions :
if your file named "myFile.m" consists of :
will set the variable myList to be a list containing elem1 and elem2.

if "myFile.m" consists of
will set myVar to be 2, since Plus[1,1] will evaluate to 2.

If you want to read some text, use the Read function.

On Thursday 24 January 2002 11:20, Ariel Fligler wrote:
> Greetings
> I have a text file with Mathematica commands that I generate using a Java
> program (I don't want to use JLINK). When I do a copy-paste operation of
> the file contents into Mathematica, everything works fine. When I do
> Get["myfile.txt"], I get lots of spelling and syntax errors. It seems that
> Get does not parse the file right. Are there any configuration parameters
> should set in Mathematica for this to work ? I could not find any.
> Thank you in advance for any help,
> Ariel.ariel.
> fligler at

  • Prev by Date: Re: Change of Variables
  • Next by Date: Re: memoizing function again
  • Previous by thread: Re: Difference between Get[] and Copy-Past operation
  • Next by thread: Change of Variables