Mathematica 9 is now available
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: [mg32514] Re: [mg32500] Difference between Get[] and Copy-Past operation
  • From: jmt <jmt at>
  • Date: Fri, 25 Jan 2002 02:57:43 -0500 (EST)
  • References: <>
  • Reply-to: jmt at
  • Sender: owner-wri-mathgroup at

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 I
> 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: File Import
  • Next by Date: RE: Change of Variables
  • Previous by thread: Difference between Get[] and Copy-Past operation
  • Next by thread: RE: Difference between Get[] and Copy-Past operation