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

Missed syntax error in Fill statement rhs #317

Closed jodavies closed 5 years ago

jodavies commented 5 years ago

In the following, FORM proceeds with no error.

Symbol x;          
Table tab(0:1);    

Fill tab(0) = 1 x; 
*Fill tab(1) = 1 x;

.end               

If one uncomments the second Fill statement, FORM reports

test.frm Line 5 --> Warning: Table element was already defined. New definition
will be used

Thanks, Josh.

vermaseren commented 5 years ago

As it should! tab(0) = 1 x; is interpreted as tab(0) = 1,x; as explained in the manual. And with 1,x it fill two table elements. and hence the compiler is right.

Btw. I also run sometimes into tricky things like this where you just don’t see what went wrong, until suddenly you see something seemingly insignificant and it turns out that indeed the compiler was right.

Cheers

Jos

On 14 Aug 2019, at 12:01, jodavies notifications@github.com wrote:

In the following, FORM proceeds with no error.

Symbol x;
Table tab(0:1);

Fill tab(0) = 1 x; *Fill tab(1) = 1 x;

.end
If one uncomments the second Fill statement, FORM reports

test.frm Line 5 --> Warning: Table element was already defined. New definition will be used Thanks, Josh.

— 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/317?email_source=notifications&email_token=ABJPCERGD3K6IOVB3NTHXN3QEPJZNA5CNFSM4ILTFJ72YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFFHMQA, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJPCEV5TTQFQOIFVNUN3Q3QEPJZNANCNFSM4ILTFJ7Q.

jodavies commented 5 years ago

Ah, OK! I didn't realize that that syntax for filling multiple elements was allowed.

Thanks!