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

Align conditional expressions: one-liners for SWITCH doesn't work as expected #156

Closed
GKaschke opened this issue Oct 18, 2023 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@GKaschke
Copy link

Logic for SWITCH doesn't work as expected. COND is ok. For option: Create if possible

Example:
" Pre -4
r_rotated_inum = switch #( i_inum when 0 then 3 else ( i_inum - 1 ) ).
r_rotated_inum = cond #( when i_inum is initial then 3 else ( i_inum - 1 ) ).

" Post <ctrl>-4
r_rotated_inum = switch #( i_inum
                           when 0 then 3 else ( i_inum - 1 ) ).
r_rotated_inum = cond #( when i_inum is initial then 3 else ( i_inum - 1 ) ).
@jmgrassau jmgrassau added the bug Something isn't working label Oct 18, 2023
@jmgrassau
Copy link
Member

Hi GKaschke,

you're right, there is no reason why this should be kept on one line – thanks for opening this issue, will look into it!

Kind regards,
Jörg-Michael

@GKaschke
Copy link
Author

Hello Jörg-Michael,
With the option "Create if possible" the SWITCH statement should be kept one line. As like as with COND.
Regards,
Günter

@jmgrassau jmgrassau self-assigned this Oct 22, 2023
@jmgrassau
Copy link
Member

Hello Günter,

this will be fixed with the next release!

Kind regards,
Jörg-Michael

@jmgrassau
Copy link
Member

Hi Günter,

thanks again for reporting this! These one-liners should work now with version 1.8.0, which was just released!

Kind regards,
Jörg-Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants