Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

statements exec as expressions when first parameter begins with = #854

Closed
lmorg opened this issue Aug 11, 2024 · 0 comments · Fixed by #849
Closed

statements exec as expressions when first parameter begins with = #854

lmorg opened this issue Aug 11, 2024 · 0 comments · Fixed by #849
Labels
bug Unexpected behavior deployed to `develop` Feature built. Currently BETA testing in the `develop` branch

Comments

@lmorg
Copy link
Owner

lmorg commented Aug 11, 2024

Describe the bug:
Statements are being executed as an expression when the first parameter is a =

murex » f == bob
cannot EqualTo left Bareword
Expression: f == bob
          :   ^
Character : 3
Symbol    : EqualTo
Value     : ''
murex » f =1 bob
nil symbol following Bareword
Expression: f =1 bob
          :      ^
Character : 6
Symbol    : Bareword
Value     : 'bob'

This doesn't happen if the first character of the first parameter is anything other than =. eg

murex » f== bob
Error in `f==` (0,1): Not a valid expression:
                    >     cannot EqualTo left Bareword
                    >     Expression: f== bob
                    >               :  ^
                    >     Character : 2
                    >     Symbol    : EqualTo
                    >     Value     : ''
                    > Nor a valid statement:
                    >     exec: "f==": executable file not found in $PATH
murex » f >=1 bob
Error in `f` (0,1): flags should begin either with '-' or '+'. Instead got '>'

Expected behaviour:
Statement should be executed as a statement

Platform (please complete the following information):

  • OS, output from uname -a if supported: n/a
  • Terminal Emulator: n/a
  • Murex version, output from version --no-app-name: potentially all in 6.x and earlier
@lmorg lmorg added the bug Unexpected behavior label Aug 11, 2024
@lmorg lmorg added the deployed to `develop` Feature built. Currently BETA testing in the `develop` branch label Aug 11, 2024
@lmorg lmorg linked a pull request Aug 11, 2024 that will close this issue
@lmorg lmorg mentioned this issue Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior deployed to `develop` Feature built. Currently BETA testing in the `develop` branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant