Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualslicer4ever

Posted 22 December 2012 - 04:47 PM

I would probably write several variants of input for common cases, such as a function that get's input as a string(as you have now), a function that gets input as a number(this function would validate integer data), and an input that take's an input as an integer, and checks that value between a min/max values.

 

you can also use variable args/arrays to create lists of strings, or numbers for validation.

 

but yes, function that stuff big time!


#1slicer4ever

Posted 22 December 2012 - 03:39 PM

I would probably write several variants of input for common cases, such as a function that get's input as a string(as you have now), a function that gets input as a number(this function would validate integer data), and an input that take's an input as an integer, and checks that value between a min/max values.

 

you can also you variable args/arrays to create lists of strings, or numbers for validation.

 

but yes, function that stuff big time!


PARTNERS