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

Read problem

 [1/4] from: lpeters:tulane at: 18-May-2005 16:26


I run the program below rebol[] file: ask "name " text: read/binary file replace text "/cs/conn" "rebol" write file text and get the following name %new.htm ** Script Error: read expected source argument of type: file url object block ** Where: do-boot ** Near: text: read/binary file replace text
>>
If I hard code the file in, it runs fine. If I try to get the same name file from the screen, it blows up. Does anyone see my error. Thank for any help.

 [2/4] from: hallvard::ystad::oops-as::no at: 18-May-2005 23:34


Lee, Here's from a rebol console session:
>> type? ask "name "
name filename == string!
>> type? to-file ask "name "
name filename == file! all you need is 'to-file. HY Dixit Lee Peters (23.26 18.05.2005):

 [3/4] from: ammon::johnson::gmail::com at: 18-May-2005 14:31


Try changing this line: text: read/binary file to: text: read/binary to file! file HTH!! ~~Ammon ;~> On 5/18/05, Lee Peters <[lpeters--tulane--edu]> wrote:

 [4/4] from: lpeters::tulane::edu at: 20-May-2005 9:01