Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11798 > unrolled thread
| Started by | Joug Raw <jougraw@gmail.com> |
|---|---|
| First post | 2012-09-18 07:53 +0000 |
| Last post | 2012-09-18 07:53 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
set option flag in function definition Joug Raw <jougraw@gmail.com> - 2012-09-18 07:53 +0000
| From | Joug Raw <jougraw@gmail.com> |
|---|---|
| Date | 2012-09-18 07:53 +0000 |
| Subject | set option flag in function definition |
| Message-ID | <k399ad$9sn$1@smc.vnet.net> |
Dear Experts, I had one question regarding to the function definition. I want to have a function that executes certain operation when I chose the corresponding option flag. For example, a function called "f" when I call it like f[arg1,arg2,arg3, optionX] it executes command arg1/arg2+arg3 If I call it like f[arg1,arg2,arg3,optionY] it executes command arg1*arg2-arg3 If I call it like f[arg1,arg2,arg3,optionSomethingElse] it returns me "No appropriate option flag was found. Please indicate correct options" This looks a bit like scripts running in UNIX. I am wondering if I can do the same in Mathematica easily? Thank you so much for your kind help!
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web