[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: concatenation with nested functions
- From: Etan Reisner <deryni@...>
- Date: Thu, 11 Feb 2010 13:49:47 -0500
On Thu, Feb 11, 2010 at 01:37:05PM -0500, Patrick wrote:
<snip>
> function one() print[[long long string]] .. function two() print('blah')
> end two() .. [[more of the long string]] end
<snip>
> Thanks for reading-Patrick
print doesn't return a string, it prints it directly, so there's nothing
to concatenate anywhere in there.
function one()
print[[long long string]]
function two()
print'blah'
end
two()
print[[more long long string]]
end
will do what you want, though you don't need to define function two there
for that to work outside of function one works just fine as well.
Alternatively maybe you meant:
function two()
return 'blah'
end
function one()
return [[long long string]] ..
two() ..
[[more long long string]]
end
print(one())
?
-Etan