metaeducation / rebol-issues

6 stars 1 forks source link

Provide a mechanism for function help to include information about what it returns #1402

Open rebolbot opened 14 years ago

rebolbot commented 14 years ago

Submitted by: PeterWood

The current function help is an improvement over R2. It would be even better if there was a structured way to include information on what the function returns.

I'm sure there are many ways that this could be achieved. One would be to have a dummy returns refinement:

verify-numeric: func [
 "Verifies a string is numeric"
 number-string [string1]
 /local
  i
 /returns
  {true if the string contains only digits
   otherwise the position of the first non-digit}

CC - Data [ Version: alpha 95 Type: Wish Platform: All Category: Syntax Reproduce: Always Fixed-in:none ]

rebolbot commented 14 years ago

Submitted by: Carl

This has been planned for a while... there's a special form for it. More later.