How should I use parameter strings on my program?
Im coding a console program that will have a lot of parameter strings.myapp -param1 param2 -param3 param4 ...etc
How could i do it without "else if". I dont want to repeat that for 400 parameters.
I've been thinking on using switch case and converting the param string to a number hash.
Is there any easier way to do it?
/g/ isn't your personal homework help board
This depends on the language, but you could do a key-value-pair with the parameter and a function for processing that thing.
Then it'll just be
>look up the function for that argument
>execute the function