Hello [EMAIL PROTECTED],

Try this then:
(copy the intended lines of code to a file and 'do it, or type it directly
at the rebol console)

    REBOL []

    file: open %test.txt  ; file content is "TEST1TEST2TEST3TEST4TEST5"

    record-size: 5   ; in this case the record size is 5

    while [not tail? file] [
        print (copy/part file record-size) ; parens not nessesary,
                                           ; but helps reading
        file: skip file record-size
    ]

    close file




Best regards
Thomas Jensen


On 03-Feb-00, [EMAIL PROTECTED] wrote:

> Thanks, that worked just fine. Now how would i get, say, the next 10
> characters. What i'm trying to do is take a line of data and break it into
> fields based on length, ie there is no delimiting characters between the
> fields??
> 
> Thanks.
> 
> Mike.
> 
> 
> 
> 
>>> Hello [EMAIL PROTECTED],
> 
>>> Try this:
>>>>> read/part %test.txt 5   ;<= 5 is the "size" argument to /part
>>> == "This "
> 
>>> (the content of the file is "This is a test file^/")
> 
> 
>>> Best regards
>>> Thomas Jensen
> 
> 
> 

Reply via email to