--****************************************************************************** --* * --* File: LuaJava_00.lua Revision: 1.0 * --* * --* Contents: a first, simple LuaJava script * --* * --* Creation: 06.11.2004 Last Modification: 07.11.2004 * --* * --* Platform: IBM-compatible PC running Windows 98SE * --* * --* Environment: Lua 5.0, LuaJava 1.0b3, Java 1.4.2 * --* * --* Author: Andreas Rozek Phone: ++49 (7031) 222305 * --* Bunsenstraße 80/1 Fax: - * --* D-71032 Böblingen EMail: Info@Andreas-Rozek.De * --* Germany * --* * --* URL: http://www.Andreas-Rozek.de/ * --* * --* Copyright: the software is published under the "GNU Lesser General Pub- * --* lic License" (see "http://www.fsf.org/copyleft/lesser.html" * --* for additional information) * --* * --* Comments: (none) * --* * --****************************************************************************** println(); println("LuaJava_00 - a first, simple LuaJava script"); println(); println("given command line arguments:"); local ArgList = getargs(); local ArgCount = table.getn(ArgList); if (ArgCount == 0) then println(" (none)"); else for i = 1,ArgCount do local Argument = tostring(ArgList[i]); -- not really necessary if (string.len(Argument) > 70) then Argument = string.sub(Argument,1,67).."..."; end; println(string.format(" %2d) \"%s\"", i, Argument)); end end; println(); complainln(">>>> this text is written onto 'stderr'"); complainln(); print("the actual separator character for file specifications is: "); println("'", io.FolderSeparator,"'"); exit(1);