bug? (Of course not)
[1/2] from: hallvard::ystad::helpinhand::com at: 20-Sep-2001 13:36
OK, got it:
>> print dummy
11
>> source dummy
dummy: func [][
return-value: "11"
append return-value "1"
return-value
]
>> print dummy
111
>> source dummy
dummy: func [][
return-value: "111"
append return-value "1"
return-value
]
>>
Sorry to bother you all with it. But how do I avoid this? I have tried
defining return-value as /local, but with no success.
~H
Du skrev (Thursday 20.09.2001, kl. 13.26):
[2/2] from: chris:ross-gill at: 20-Sep-2001 8:04
Hi Hallvard,
> Sorry to bother you all with it. But how do I avoid this? I have
> tried defining return-value as /local, but with no success.
Simply make a copy of the value so the value itself is not referenced:
dummy: func [][
return-value: copy "1"
append return-value "1"
return-value
]
- Chris