[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: ASCII Art
- From: Rapin Patrick <rapin.patrick@...>
- Date: Sun, 11 Nov 2012 14:04:29 +0100
Hi,
I just discovered an interesting Lua syntax feature.
Provided you define that simple function :
function _() return _ end
The following code actually compiles and executes without error :
_() ()
You can of course pass dummy arguments to _ function :
_(___)(_,_)
And since you can omit parentheses on functions calls with table constructors and literal strings:
_{} "" '' [[ ]]
You should be able to draw beautiful Lua program in ASCII Art.
_(
_)()
{".."}
(_,{}){}
'////\\\\'
{}(){___}[=[
::--.--::]=](_)
The main problem being that I have always be very bad for drawing :-(
--
-- Patrick Rapin
-- coauthor of "Le guide de Lua et ses applications", D-BookeR