Logo

Programming-Idioms

History of Idiom 205 > diff from v2 to v3

Edit summary for version 3 by programming-idioms.org:
Less confusing IMO if we name the result variable foo

Version 2

2019-09-29, 17:15:38

Version 3

2019-09-29, 19:10:17

Idiom #205 Get an environment variable

Read an environment variable with the name FOO and assign it to the string variable env. If it does not exist or if the system does not support environment variables, assign a value of "none".

Idiom #205 Get an environment variable

Read an environment variable with the name "FOO" and assign it to the string variable foo. If it does not exist or if the system does not support environment variables, assign a value of "none".

Extra Keywords
envvar os system