[REBOL] Re: ROUND function (like TRUNC, FLOOR, etc...)
From: carl:cybercraft at: 20-Feb-2002 19:39
On 20-Feb-02, Charles wrote:
> I do not believe I've come across these three in my (highly
> limited) studies. Is there a decent reference to them in "REBOL For
> Dummies", or one of the online guides? (Preferrably a non-PDF
> guide.) Thanks.
> --Charles
Others can have a go at 'context, but the other two are just function
shortcuts.
'does is for functions with no arguments or locals so instead of...
say-something: func [][print "something"]
you can have...
sat-something: does [print "something"]
while 'has is for functions with locals but no arguments. So instead
of this...
a: func [/local n][n: 10 do-something-using n]
you can have this...
a: has [n][n: 10 do-something-using n]
'does at least can save a lot of empty blocks apearing in your
scripts.
>> On 19-Feb-02, Joel Neely wrote:
>>> I realize that this is not a perfect model (given the existence
>> of
>>> such trivial shortcuts as CONTEXT, DOES, and HAS) but nobody's
>>> perfect! ;-)
>> Trivial they may be, but I use 'does extensively and 'has often,
>> and
>> so they're very useful shortcuts. I don't think I'd use a rounding
>> function in nearly every script like I do those two words.
>> --
>> Carl Read
--
Carl Read