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

Feature: ELIF keyword #248

Closed
MiranDMC opened this issue Sep 3, 2023 · 2 comments
Closed

Feature: ELIF keyword #248

MiranDMC opened this issue Sep 3, 2023 · 2 comments

Comments

@MiranDMC
Copy link

MiranDMC commented Sep 3, 2023

Please introduce ELIF keyword, so switch-like codes:

if
	0@ == 1
then
	print_help 'ONE'
else
	if
		0@ == 2
	then
		print_help 'TWO'
	else
		if
			0@ == 2
		then
			print_help 'THREE'
		else
			print_help 'OTHER'
		end
	end
end

can be simplified to:

if
	0@ == 1
then
	print_help 'ONE'
elif
	0@ == 2
then
	print_help 'TWO'
elif
	0@ == 3
then
	print_help 'THREE'
else
	print_help 'OTHER'
end
@MiranDMC MiranDMC changed the title Feature: elfi keyword Feature: **ELIF** keyword Sep 3, 2023
@MiranDMC MiranDMC changed the title Feature: **ELIF** keyword Feature: ELIF keyword Sep 3, 2023
@x87
Copy link
Collaborator

x87 commented Sep 4, 2023

I think it's a duplicate of #160

@x87
Copy link
Collaborator

x87 commented Sep 10, 2023

I think I prefer else if syntax more, so closing this ticket in favor of #160

@x87 x87 closed this as completed Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants