Skip to main content
7 events
when toggle format what by license comment
Apr 9, 2020 at 14:50 comment added Kusalananda @Pablo Correct.
Apr 9, 2020 at 14:43 comment added Pablo Thanks, I understood it now. By the way, here in the function local choice will create a local variable whose value will not change or influence the value of global choice, right?
Apr 9, 2020 at 14:40 vote accept Pablo
Apr 9, 2020 at 14:40 history edited Kusalananda CC BY-SA 4.0
added 352 characters in body
Apr 9, 2020 at 14:38 comment added Kusalananda @Pablo No, calling choice_func "$choice" (note the $) gives the function its value in the first positional parameter, $1. It would be a good thing to do. I will add this to the answer.
Apr 9, 2020 at 14:36 comment added Pablo So calling function like choice_func "$choice" is useless?
Apr 9, 2020 at 14:34 history answered Kusalananda CC BY-SA 4.0