Hi Raimund

This should work with text:

 >> parse/all read %lines.txt newline
== ["line 1" "line 2" "line 3" "line 4" "line 5"]

Regards

Peter



On 17 Feb 2009, at 01:19, Raimund Dold wrote:

>
> Am Samstag 14 Februar 2009 schrieb Robert M. M=FCnch:
>> Am 14.02.2009, 11:11 Uhr, schrieb Raimund Dold <[email protected]>:
>>> maybe I did not find the answer in the docs, but anyway.
>>>
>>> In R2.0 I regularly used something like read/lines %myfile.txt to  
>>> read a
>>> file and get the single lines. How I am supposed to do this in R3?
>>
>> Hi, because R3 supports unicode and unicode can be encoded in  
>> different
>> ways, you know have to specify a "format" you want the data to be  
>> loaded.
>> Try:
>>
>>      deline to-string read %myfile.txt
>>
> Hi,
>
> I tried your suggestion but does not provide what I wanted.=20
>
> I have a file lines.txt with the following contents:
> line 1
> line 2
> line 3
> line 4
> line 5
>
> Doing the following in R3:
>
>>> dat: deline to-string read %lines.txt
> =3D=3D {line 1
> line 2
> line 3
> line 4
> line 5
> }
>
>>> length? dat
> =3D=3D 35
> =20
> Which shows clearly, that I do not get what read/lines %lines.txt  
> did in R2=
> =2E=20
> If I even omit the deline I get the identical results. For me deline  
> seems =
> to=20
> be only useful if I get a file from a different platform.
>
> Any more suggestions for the read/lines replacement in R3??
>
> Raimund
> -- 
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to