Hi Rebols,
in the case anybody would like to have an as correct and general as possible
version of Ifs, here you are:
ifs: func [
{If positive do positive-block, zero do zero-block, negative do
negative-block}
[throw]
condition [number! char! money! time!]
positive-block [block!]
zero-block [block!]
negative-block [block!]
] [
either positive? condition [do positive-block] [
either negative? condition [do negative-block] [do zero-block]
]
]
Look out! It is necessary to write the arguments in correct order!
Regards
Ladislav
- [REBOL] Rebol/Core User's Guide lmecir
- [REBOL] Rebol/Core User's Guide Re: joel . neely
- [REBOL] Rebol/Core User's Guide Re:(2) lmecir
- [REBOL] Rebol/Core User's Guide Re:(3) joel . neely
- [REBOL] Rebol/Core User's Guide Re:(4) lmecir
- [REBOL] Ifs Re: lmecir
- [REBOL] Ifs Re: joel . neely
- [REBOL] Ifs Re:(2) lmecir
- [REBOL] Ifs Re:(3) joel . neely
- [REBOL] Ifs Re:(4) lmecir
- [REBOL] Ifs Re:(5) joel . neely
- [REBOL] Ifs Re:(6) lmecir
- [REBOL] RIP ifs-for-whomever joel . neely
- [REBOL] Rebol von Neumann prope... lmecir
- [REBOL] Rebol von Neumann prope... joel . neely
- [REBOL] Rebol von Neumann prope... lmecir
