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

[REBOL] Enumerated type creation Re:

From: rebol:keithdevens at: 5-Sep-2000 10:57

This sounds like a job for Design by Contract. :) As far as I know the only thing you can do in rebol is check for those inputs and throw an error if the argument doesn't match one of them. Keith P.S. I wonder if Carl's ever looked at Eiffel and such for ideas for Rebol. I know he's dealt with a lot of languages, but I'm interested to find out if he's ever had any dealings with Eiffel and Design by Contract stuff... Sather has it also, although I haven't looked at it too much at all. ----- Original Message ----- From: <[princepawn--lycos--com]> To: <[list--rebol--com]> Cc: <[feedback--rebol--com]> Sent: Tuesday, September 05, 2000 10:39 AM Subject: [REBOL] Enumerated type creation
> I want to constrain the input values for a string field to be either the
words "cancel" or "nocancel".
> REBOL has excellent support for forcing a function argument to be date!,
time!, string!, but I want to increase the restrictions for a particular field and have it throw an error on spurious input.