vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.15k stars 136 forks source link

Replacing power sign using dictionaries #358

Closed spj101 closed 4 years ago

spj101 commented 4 years ago

The FORM manual states that dictionaries can be used to replace the power sign in an expression. However, I can't seem to get this to work correctly.

The following program:

Symbols x;
#OpenDictionary test
  #add ^:"**"
#CloseDictionary
Local F = x^2;
#UseDictionary test
Print;
.end

Outputs:

F = x^2;

Rather than the expected:

F = x**2;

Is this a bug or am I misunderstanding how to use dictionaries?

vermaseren commented 4 years ago

See answer to #358

Jos

On 14 Jul 2020, at 20:41, Stephen Jones notifications@github.com wrote:

The FORM manual https://www.nikhef.nl/~form/maindir/documentation/reference/online/online.html#SECTION001400000000000000000 states that dictionaries can be used to replace the power sign in an expression. However, I can't seem to get this to work correctly.

The following program:

Symbols x;

OpenDictionary test

add ^:"**"

CloseDictionary

Local F = x^2;

UseDictionary test

Print; .end Outputs:

F = x^2; Rather than the expected:

F = x**2; Is this a bug or am I misunderstanding how to use dictionaries?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vermaseren/form/issues/358, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJPCEVB7NK4YJSYQERAZFTR3SRGZANCNFSM4OZZINNQ.

spj101 commented 4 years ago

Thankyou @vermaseren for fixing this so quickly! It seems to be working correctly for me.