[REBOL] Problems with remove/part refinement Re:
From: allen:rebolforces at: 18-Aug-2000 16:56
----- Original Message -----
From: <[moeller_thorsten--gmx--de]>
To: <[list--rebol--com]>
Sent: Friday, August 18, 2000 4:15 PM
Subject: [REBOL] Problems with remove/part refinement
> Hi all,
>
> i got following script to clean up and modify a file:
>
> REBOL [
> Title: "Tsbewout - Cleaner"
> Date: 16-Aug-2000
> File: %tsbewout.r
> Author: "Thorsten Moeller"
> Purpose: { Cleans tsbewout-file }
> ]
>
> remove: func [act] [
> script2: read %tsbewout2
> parse script2 [some[to act mark: (remove/part mark 1)]]
> ]
>
You redefined the 'remove function, and when you call 'remove/part that
refinement is not part of the new 'remove function you wrote. Give your
function another name, that is the easiest thing to do.
REBOL allows us to redefine functions and that can be very powerful, and a
little dangerous.
To help prevent you accidentally doing this you can put protect-system in
your user.r
? protect-system
USAGE:
PROTECT-SYSTEM
DESCRIPTION:
Protects all system functions and the system object from redefinition.
PROTECT-SYSTEM is a function value.'
Cheers,
Allen K