Re: Syntax errors in autogenerated packages
- To: mathgroup at smc.vnet.net
- Subject: [mg31969] Re: [mg31929] Syntax errors in autogenerated packages
- From: jmt <jmt at agat.net>
- Date: Fri, 14 Dec 2001 16:52:56 -0500 (EST)
- References: <200112120914.EAA28808@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I encountered the same kind of problems in version 4.0, in the following
situation :
a long long compound expression, in a cell marked as "initialization cell",
intended to generate a ".m" file.
The solution I adopted finally is to enclose the compound expression with (),
i.e. :
myFunction[args___]:=Module[{vars},
(
expr1;expr2);
...
(exp3;expr4)
]
I might be wrong, but I suspect the parser to be disturbed when compound
expressions are longer than a certain integer.
jmt
On Wednesday 12 December 2001 10:14, Alan Mason wrote:
> Hello,
> Has anyone else encountered syntax errors when using Needs[...] to read
> into Mathematica (v4.1, Windows) a package created automatically from a
> master notebook using AutoGeneratedPackage? I know the basic mechanism is
> working, because the *.m file is saved to disk together with the master
> *.nb file and looks OK. Unfortunately, when I read the *.m file into a new
> notebook using Needs[...] I get spurious error messages and the load is
> Aborted. A typical error message is
>
> "a[" cannot be followed by "[1, 1, 2]]"
>
> although this is normal Mathematica syntax and causes no trouble in the
> notebook.
>
> When I examine the *.m file, there's nothing obviously amiss. I searched
> the MathGroup Archive for AutoGeneratedPackage and Needs but couldn't find
> anything relevant.
>
> Thanks for any help.
>
> Alan
- References:
- Syntax errors in autogenerated packages
- From: "Alan Mason" <swt@austin.rr.com>
- Syntax errors in autogenerated packages