Skip to content

Checking that a local expression is zero #585

@vsht

Description

@vsht

Dear all,

I know that it's a stupid question, but I really wasn't able to find an elegant way solve it without complicating
everything too much. So is there a simple way to check if the given local expression is zero during the execution?

Consider for example

S a,b; 
L exp1 = a+b;
L exp2 = a*b;
.sort
id a=-b;
.sort
* More code
print;
.end

here exp1 becomes zero after the id statement, while exp2 is not zero. Ideally, I would like to detect exp1 vanishing and finish the program right here (or maybe jump to the end), instead of going through all the subsequent code instructions.

Cheers,
Vlad

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions