Skip to content

Op_Tame procedure returns 0 in one case, should return boolean true. #2

@agryman

Description

@agryman

See:

Op_Tame:=proc(WOp::list(list))

Op_Tame:=proc(WOp::list(list))
    local parity,first,i,t,Wterm:

    if nops(WOp)=0 then return 0 fi:

    for i to nops(WOp) do
      Wterm:=WOp[i][2]:
      parity:=0:
      for t in Wterm do
        if t in [ Xspace_Pi, Xspace_PiPi2, Xspace_PiPi4 ] then
          return false:
        fi:
      od:
    od:

    true:
end:

The incorrect line is:

    if nops(WOp)=0 then return 0 fi:

The correction is:

    if nops(WOp)=0 then return true fi:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions