Bug in delete?
[1/3] from: reboler:programmer at: 28-Feb-2002 9:08
The following does not work, from the /Core Guide in the Files Section:
A block of files within the same directory can also be deleted:
delete [%file1 %file2 %file3]
See the console output below.
Is this a bug or a feature? ;)
The source for 'delete shows it will not accept a block!
Did I miss another function that will delete all files in a block?
( besides... forall my-block [delete my-block/1])
>> write %test.1 "test1"
>> write %test.2 "test2"
>> write %test.3 "test3"
>> list-dir
bad-script.r comp-test.r desktop/ edit-prefs.r
feedback.r license.html local/ prefs.r
public/ rebol.exe rebol.r setup.html
test.1 test.2 test.3 user.r
view-pro031.zip web-reb-info.txt
>> files: [%test.1 %test.2 %test.3]
== [%test.1 %test.2 %test.3]
>> delete files
** Script Error: delete expected target argument of type: file url
** Where: halt-view
** Near: delete files
>> delete [%test.1 %test.2 %test.3]
** Script Error: delete expected target argument of type: file url
** Where: halt-view
** Near: delete [%test.1 %test.2 %test.3]
[2/3] from: sunandadh::aol::com at: 28-Feb-2002 13:14
While we're chipping in bugs in random, spot the difference in these
(reported to Feedback a while back)
random 2 ;; integer -- returns 1 or 2
random 2x2 ;; pair -- returns 1x1, 1x2, 2x1 or 2x2
random 2.2.2 ;; tuple -- returns 0.0.0 thru 1.1.1
Sunanda
[3/3] from: carl:cybercraft at: 1-Mar-2002 19:40
On 01-Mar-02, [SunandaDH--aol--com] wrote:
> While we're chipping in bugs in random, spot the difference in these
> (reported to Feedback a while back)
> random 2 ;; integer -- returns 1 or 2
> random 2x2 ;; pair -- returns 1x1, 1x2, 2x1 or 2x2
> random 2.2.2 ;; tuple -- returns 0.0.0 thru 1.1.1
Interesting. Here's another version of 'forever for you...
a: 1.1.1 while [a/1 <> 255][a: random 255.255.255]
I guess with tuples a special case is needed so that random 255
returns from 0 to 255 instead of from 1 to 255.
--
Carl Read