Hi,
Does this help?
tst: func [
{help for tst...}
x [none! integer!] ' Argument must be either of integer or none
datatype.
][
if none? x [help tst]
print x
]
Regards,
Bernie Schneider
Systems Analyst
CIBER, Inc.
303-224-4159
[EMAIL PROTECTED]
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, March 13, 2000 11:57 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Function without argument ... Re:
>
> In einer eMail vom 13.03.00 19:34:33 (MEZ) Mitteleurop�ische Zeit schreibt
>
> [EMAIL PROTECTED]:
>
> << s it possible to test a lack of argument in a function ?
> I try things like this but... it doesn't work !
>
> tst: func [
> {help for tst...}
> x [integer!]
> ][
> if none? x [help tst]
> print x
> ]
>
> tst
> ** Script Error: tst expected x argument of type: integer.
> ** Where: tst
> >>
>
> Yes, i saw something in the userguide by functions. i hope it was
> x [anytype?], no [any-type?]
> --
> users/expfunctions.html#OptionalArguments :
>
> Optional Arguments
> Functions can be created that take arguments optionally. Do this by
> specifying the any-type! datatype identifier in the argument specification
>
> block:
>
>
> print-val: func [val [any-type!]] [
> print either value? 'val [val]["No value given"]
> ]
>
> print-val 1234
> 1234
>
> print-val
> No value given
>
> (...and a bit more)
>
> Volker