A alyarb Platinum Member Jan 25, 2009 2,425 0 76 Sep 7, 2009 #1 i'm going to have user-defined integers and they have to be between 0-23, 0-100, etc. how do i set this range? thanks
i'm going to have user-defined integers and they have to be between 0-23, 0-100, etc. how do i set this range? thanks
Nothinman Elite Member Sep 14, 2001 30,672 0 0 Sep 7, 2009 #2 Um, why? And why not just verify the number is in range when accepting the input?
Cogman Lifer Sep 19, 2000 10,286 145 106 Sep 7, 2009 #3 if (val >= 23 || val <=0) doerror(); else dosomethingelse();