The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: set option flag in function definition
Replies: 1   Last Post: Sep 19, 2012 4:57 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 22
Registered: 5/30/12
set option flag in function definition
Posted: Sep 18, 2012 3:53 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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

If I call it like f[arg1,arg2,arg3,optionY]
it executes command

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!

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.