Login  Register

Re: I need some explaination about arguements assignment

Posted by aria2end on Aug 07, 2014; 4:16am
URL: https://forum.world.st/I-need-some-explaination-about-arguements-assignment-tp4772102p4772106.html

The function is not complete and it doesn't do anything. I tried to write a recursive function to get value of each node of my tree structure, put it in a String and return it in a proper format so later show it on the transcript but I couldn't never done that and now I rewritten it completely in a different way but still I cant understand what is happening here.

The line below just iterates through an OrderedCollection and concatenate each node level to aText :
LoL lols do: [ :each | aText := aText , each level , (String with: Character cr) ].

But as soon as I  include that line in my function and the debugger reaches to [ counter <= aNumb ] then I receive this error : " Error: Reading a number failed: a digit between 0 and 9 expected. ".

which is strange because I am very sure that I pass a number to aNumb but  now aNumb holds the value of aText !!

It doesn't give me any error when I copy aText value in copyText and use copyText instead of aText.

I can't see what is the problem with using aText directly.