Author Topic: Invalid syntax in SpinDynamica v2.10.1  (Read 2693 times)

JyrkiRantaharju

  • Member
  • *
  • Posts: 36
    • View Profile
Invalid syntax in SpinDynamica v2.10.1
« on: August 22, 2014, 11:33:52 AM »
Hello,

there seems to be invalid syntax in SpinsOrderedQ section of SpinOperators notebook. Colon ( : ) is missing from the line 871 (SpinsOrderedQ[{label_..}] = True; ).

Best, Jyrki.
« Last Edit: August 22, 2014, 11:36:52 AM by Jyrki Rantaharju »

JyrkiRantaharju

  • Member
  • *
  • Posts: 36
    • View Profile
Re: Invalid syntax in SpinDynamica v2.10.1
« Reply #1 on: August 22, 2014, 01:22:02 PM »
Adding the colon seems to fix the problem when I run SDv2.10.1 with Mathematica 9 but when I run it with Mathematica 8 SDv2.10.1 still prints message about syntax error in line 871.

The syntax error seems to be actually the missing space between label_ and ... The colon seems not to be needed.

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: Invalid syntax in SpinDynamica v2.10.1
« Reply #2 on: September 26, 2014, 10:20:37 PM »
Hi Jyrki,
 I just saw this bug report, which I had overlooked. However I cannot locate the problem. I encounter no error messages, at least in Mathematica 9. I also do not see an obvious problem with the syntax. Can you clarify please?
 thanks
malcolm

JyrkiRantaharju

  • Member
  • *
  • Posts: 36
    • View Profile
Re: Invalid syntax in SpinDynamica v2.10.1
« Reply #3 on: September 27, 2014, 04:35:42 PM »
Hello Malcolm,

I made notebook to clarify the problem. The notebook (Rebort.nb) is attached.

Best regards,
Jyrki.
« Last Edit: September 27, 2014, 05:29:54 PM by Jyrki Rantaharju »

JyrkiRantaharju

  • Member
  • *
  • Posts: 36
    • View Profile
Re: Invalid syntax in SpinDynamica v2.10.1
« Reply #4 on: September 29, 2014, 01:34:58 PM »
Hello Malcolm,

I made the report.nb notebook with Mathematica 8.

It turns out that Mathematica 9 does not complain about the invalid syntax, when SpinDynamica is loaded, but it still does not accept the definition.
This can be tested by evaluating the SpinsOrderedQ[{label_..}] = True;‚ syntax with Mathematica 9 and 8. Mathematica does not accept the definition and prints error messages, in both cases.

It might be that SDv2.10.2 runs fine with Mathematica 9, even that the above definition fails. With Mathematica 8 loading of SDv2.10.2 fails.

Best regards,
Jyrki.

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: Invalid syntax in SpinDynamica v2.10.1
« Reply #5 on: September 29, 2014, 01:45:29 PM »
Thanks Jyrki,
 You're right, the repeated pattern in SpinsOrderedQ[{label_..}] is not parsed by Mathematica, to my surprise.
 I will replace it by the equivalent SpinsOrderedQ[{Repeated[label_]}] in the next release. This does parse correctly, at least in 9.
 I think there is no urgency, since I'm not aware of any real problems being caused by this "Schönheitsfehler" right now.
all the best
malcolm

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: Invalid syntax in SpinDynamica v2.10.1
« Reply #6 on: December 08, 2014, 02:05:34 PM »
This problem has been fixed in SD v2.11.1