lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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