Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: How to check function arguments ?

From: rotenca:telvia:it at: 9-Jun-2002 1:59

Hi Jason,
> >> somefunc: func [inp] [print [inp * 3.14159]] > >> somefunc 4 > 12.56636 > >> somefunc > ** Script Error: somefunc is missing its inp argument > ** Near: somefunc > > Q1: How to catch the missing param so the script won't crash?
somefunc: func [inp [any-type!]] [if value? 'inp [print [inp * 3.14159]]] --- Ciao Romano