Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Implicit renaming

 [1/5] from: richard::coffre::francetelecom::com at: 15-Apr-2002 10:27


Hi Rebol fellows, Why with the following code : REBOL [] file: to-file ask "Filename? " texte: read/lines file output1: copy head change find/last file "." ".loc" output2: copy head change find/last file "." ".lst" print ["le fichier trait=E9 est '" file "'."] print ["le fichier '" output1 "' a =E9t=E9 cr=E9=E9."] print ["le fichier '" output2 "' a =E9t=E9 cr=E9=E9."] I have the result below where the variable "file" has changed its valuee !!!!
>> do %flash/testfile.r
Script: "Untitled" (none) Filename? generic4.txt le fichier trait=E9 est ' generic4.lst '. le fichier ' generic4.loc ' a =E9t=E9 cr=E9=E9. le fichier ' generic4.lst ' a =E9t=E9 cr=E9=E9. What can I do to avoid this ? TIA Richard Coffre France Telecom Orbiscom T=E9l. : 01 47 61 46 28

 [2/5] from: brett:codeconscious at: 15-Apr-2002 21:00


Hi Richard,
> output1: copy head change find/last file "." ".loc" > output2: copy head change find/last file "." ".lst"
You have COPY in the wrong position. The lines should be: output1: head change find/last COPY file "." ".loc" output2: head change find/last COPY file "." ".lst" Brett.

 [3/5] from: joel:neely:fedex at: 15-Apr-2002 6:55


Hi, Richard, COFFRE Richard FTO wrote:
> Hi Rebol fellows, > Why with the following code :
<<quoted lines omitted: 3>>
> output1: copy head change find/last file "." ".loc" > output2: copy head change find/last file "." ".lst"
Try instead output1: head change find/last copy file "." ".loc" output2: head change find/last copy file "." ".lst" HTH! -jn- -- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]

 [4/5] from: richard:coffre:francetelecom at: 15-Apr-2002 14:13


OK, I realize that "Practice makes perfect" but step by step. Thank a lot -----Message d'origine----- De : Brett Handley [mailto:[brett--codeconscious--com]] Envoy=E9 : lundi 15 avril 2002 13:01 =C0 : [rebol-list--rebol--com] Objet : [REBOL] Re: Implicit renaming Hi Richard,
> output1: copy head change find/last file "." ".loc" > output2: copy head change find/last file "." ".lst"
You have COPY in the wrong position. The lines should be: output1: head change find/last COPY file "." ".loc" output2: head change find/last COPY file "." ".lst" Brett.

 [5/5] from: greggirwin:mindspring at: 15-Apr-2002 10:25


Hi Richard, << file: to-file ask "Filename? " output1: copy head change find/last file "." ".loc" output2: copy head change find/last file "." ".lst" I have the result below where the variable "file" has changed its valuee !!!! What can I do to avoid this ?
>>
Use COPY before you use CHANGE. output1: copy head change find/last copy file "." ".loc" output2: copy head change find/last copy file "." ".lst" --Gregg

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted