Skip to content

replace_ fails to handle 0-replacement #367

@pschicho

Description

@pschicho

The following program causes an error for the replacement of s1 -> 0. For s1-> (other integer) there is no issue. I remember this to work with previous versions.

auto s s;
f f I;

L [g] =
      I(f(s1+2,s2,s3))
      ;
multiply replace_(s1,0);

print+s;
.end
FORM 4.2.1 (Aug 10 2020, v4.2.1-29-g557be9d) 64-bits  Run: Fri Oct 16 14:07:16 2020
    auto s s;
    f f I;

    L [g] =
          I(f(s1+2,s2,s3))
          ;
    multiply replace_(s1,0);

    print+s;
    .end
Internal error in InFunction: Function not encountered.
Program terminating at replacetest.frm Line 9 -->
  0.00 sec out of 0.00 sec

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions