[REBOL] Re: LDC goes Rugby!
From: brett:codeconscious at: 24-May-2001 1:14
Hi Maarten,
> Aren't locals initialized to none by default?
Yup. Therein lies the problem, because FOR needs something specified as
end
as in:
>> for i 1 none 1 []
** Script Error: for expected end argument of type: number series money
time date char
** Where: halt-view
** Near: for i 1 none 1
Which is the error I received.
> Where did the bug occur? I haven't run into it yet myself.
>
;fill a string with zeros (used for message lengths etc.)
fill-0: func [ filly [string!] how-many [integer!] /local fills]
[
fills: 0 ; <-- my addition *****
if how-many > length? filly
[
fills: how-many - length? filly
]
for filz 1 fills 1 [ ; <----- fills must not be none ****
insert filly "0"
]
return filly
]
Regards,
Brett