Here's a trick to avoid repeating a list of things in multiple places:
#define ENUMERATE_THINGS \
ENUMERATE_THING(Foo) \
ENUMERATE_THING(Bar) \
ENUMERATE_THING(Baz)
#define ENUMERATE_THING(thing) thing
ENUMERATE_THINGS
Here's a trick to avoid repeating a list of things in multiple places:
#define ENUMERATE_THINGS \
ENUMERATE_THING(Foo) \
ENUMERATE_THING(Bar) \
ENUMERATE_THING(Baz)
#define ENUMERATE_THING(thing) thing
ENUMERATE_THINGS
<# | |
Prerequisites: PowerShell version 3 or above. | |
License: MIT | |
Author: Michael Klement <mklement0@gmail.com> | |
DOWNLOAD and DEFINITION OF THE FUNCTION: | |
irm https://gist.github.com/mklement0/8689b9b5123a9ba11df7214f82a673be/raw/Out-FileUtf8NoBom.ps1 | iex | |
The above directly defines the function below in your session and offers guidance for making it available in future |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |