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

Nextflow review @bobturneruk ep11, Ternary operators #142

Open
ggrimes opened this issue Apr 23, 2024 · 1 comment
Open

Nextflow review @bobturneruk ep11, Ternary operators #142

ggrimes opened this issue Apr 23, 2024 · 1 comment

Comments

@ggrimes
Copy link
Collaborator

ggrimes commented Apr 23, 2024

Ternary operators should be explained more fully if the term is to be used.

@ggrimes
Copy link
Collaborator Author

ggrimes commented Apr 23, 2024

I mention Ternary operators mention in the episode 11 as below.

This code uses the ternary operator that is a shortcut expression that is equivalent to an if/else branch assigning some value to a variable.

If expression is true? "set value to a" : "else set value to b"

would you like an example added ? e.g.

penv = task.cpus > 1 ? "sharedmem" : null 

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

1 participant