MathGroup Archive 2006

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

Search the Archive

Re: Re: stytax error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66646] Re: [mg66606] Re: stytax error
  • From: Bruce Miller <brucem at wolfram.com>
  • Date: Thu, 25 May 2006 02:58:41 -0400 (EDT)
  • References: <e4mndn$6q0$1@smc.vnet.net> <200605222214.SAA09802@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Gentlemen,

I would be helpful if you sent example (small) notebooks and resulting package
files to support at wolfram.com.   (You may put "Attn: Bruce" in the subject line.)

Special characters may lurk in code like "Which[fU T fL,..".

If you have this code in StandardForm input cells, does it make a difference
if the cells are converted to InputForm before saving as a package?

Bruce Miller
Technical Support
Wolfram Research, Inc.
support at wolfram.com
http://support.wolfram.com/



On May 22, 2006, at 5:14 PM, John Jowett wrote:

> Chris,
>         I had a similar problems with a package auto-saved from 
> notebooks
> recently.  In fact it was even stranger: I found that the packages 
> worked
> fine with Mathematica on Windows but I got syntax errors when reading 
> them
> into a Linux kernel (the same files from the same file system).   I 
> found
> that I could fix the problem by converting the package file to Unix 
> format
> (changing the end-of-line characters.   Finally I managed to track 
> down the
> line where the error occurred: it was a usage message where I had typed
> something like
>
> func:usage="text of message" ;
>
> Note that I had typed a (useless but, I would have thought, harmless) 
> space
> before the semi-colon. The line happened to be of a length such that 
> it was
> broken when saved to give something like
>
> func:usage="text of message" \
> ;
>
> and this was causing the problem.  Eliminating the space fixed it.  
> This was
> inside a big package and was not on the line number mentioned in the 
> error
> message so it was hard to track down.     Perhaps you have something 
> similar
> in your file.
>
> I would call this a bug.
>
> John Jowett
>
>
> "Chris Chiasson" <chris at chiasson.name> wrote in message
> news:e4mndn$6q0$1 at smc.vnet.net...
>> Hello,
>> On loading a package file, Mathematica says it finds a syntax error on
>> a certain line number (which I have located in emacs).
>>
>> Here is the relevant code snippet:
>>
>> Module[{stdexitout, xtemp}, stdexitout = {x, f, oldxL,
>>     oldfL, xL, fL, xU, fU, xmax, evalcount, evallimit, tol};
>>     Which[fU T fL, stdexitout, xU == xmax,
>>         Message[MessageName[FindUnimodalMinimum, "unbound"]];
>>         stdexitout, evalcount T
>>     evallimit, Message[MessageName[FindUnimodalMinimum, "
>>       evallimit"]]; stdexitout, True, xtemp = Min[(1 + a) xU - a xL, 
>> xmax];
>>       boundunimodaldecision[x, f,
>>           xL, fL, xU, fU, xtemp, ReplaceAll[f, Rule[x, xtemp]], xmax, 
>> \
>> evalcount + 1, evallimit, tol]]];
>>
>> In the package file, the indicated line (on or before where the syntax
>> error occurrs, according to Mathematica) includes the following code:
>> Message[MessageName[FindUnimodalMinimum,"evallimit"]];stdexitout,True,
>>
>> The entire module statement is correct syntax, or at least it
>> evaluates without errors when executed in a notebook.
>>
>> What, if anything, should I do about this?
>>
>> Thanks,
>> -- 
>> http://chris.chiasson.name/
>>


  • Prev by Date: Re: Interval[{a,b}]-Interval[{a,b}] = 0?
  • Next by Date: LaTeX and the ConversionRules option
  • Previous by thread: Re: stytax error
  • Next by thread: Re: stytax error