[REBOL] Re: Block as parameter
From: carl:cybercraft at: 17-Aug-2002 23:57
On 17-Aug-02, Philippe Oehler wrote:
> Hello RebList !
> I often pass as parameter a block to a function. The block is often
> the result of a read/lines function.
> The problem is that, when I pass this block as parameter, it seems
> that block is changed :
> Below,
> a: read/lines %theTXT.txt
> length? a ; --> 12 ; because of 12 lines
> but when i pass 'a to a function the result is :
> make-this: func [the-block] [ print length? the-block; ----> 120 ;
> because for example, my txt has a 10 column structure
> ]
> make-this a
> How could I keep the block intact, without any transformation ??
Like Andrew, I couldn't duplicate your problem. I wondered if it had
something to do with tabs in your text to create your "10 column
structure", but tabs made no difference. A block, passed to a
function, should still be the same block - no changes to it should
occur. So, what do you mean by a 10 column structure?
--
Carl Read