Alternative To A Specific Switch Statement

Colin Holgate coiin at verizon.net
Fri Mar 15 08:23:05 EDT 2013


If there are only two possibly outcomes, wouldn't you use an if statement?


On Mar 15, 2013, at 8:11 AM, "Peter M. Brigham" <pmbrig at gmail.com> wrote:

> And combining the suggestions, you could do:
> 
> put sin(pAngleInRadians) into sinCalc
> switch sinCalc
>   case 0
>      put 0 into tX
>      break
>   default
>      put sinCalc/abs(sinCalc) into tX
> end switch




More information about the use-livecode mailing list