Hey guys, I am trying to setup a function that performs some stuff but I'm trying to generate a warning in case the argument of the function is not recognized. If a warning is generated, it stops any evaluation that comes after. Something like
`myfunction[arg_]:=Block[{list}, list={a,b,c}; Which[Position[list, arg] === {}, Message[myfunction::warn, arg]; Abort]; [do other stuff] ]`
A simple `If[]` would work there, but I was just trying to avoid having everything inside an `If[]`. Maybe there exists a `If[]` that doesn't require my providing an argument for the `[else]` part? Something l…