[REBOL] best means of passing refinements from main to helper function? Re:
From: jelinem1:nationwide at: 15-Sep-2000 16:14
This seems to be an occasionally reoccurring topic. In short I don't think
anyone has come up with a simple elegant way of doing this. A few of us
have come up with solutions which involve building the helper-function
call/refinements string. You might find, however, that you would rather use
a bunch of 'if statements.
- Michael Jelinek
[princepawn--MailAndNews--com]@MailAndNews.com> on 09/15/2000 03:30:03 PM
From: [princepawn--MailAndNews--com]@MailAndNews.com on 09/15/2000 03:30 PM
Please respond to [list--rebol--com]
Sent by: Terrence Brannon <[princepawn--MailAndNews--com]>
Subject: [REBOL] best means of passing refinements from main to helper
I want to know the best way to propagate refinement selections (or their
to a function which actually does the processing for them.
deduction: func [/use-month month-to-use /use-day day-to-use] [
rejoin [ "file-"
either use-month [ month-to-use ] [
either use-day [ day-to-use ] [ now/day
main [/use-month month-to-use
; --- dilemma:
; --- I can call deduction with
; --- a - no refinements
; --- b - either or 1 refinement
; --- c - both refinements
; and I dont want a bunch of hairy eithers and ifs to create
; all the various refinements to send to deduction
terrence-brannon: [[princepawn--yahoo--com] perl-refugee myth-gamer]
; all the above is real REBOL code, believe it or not.