나는 lcurses (luarocks + luajit)를 설치했지만 튜토리얼을 찾을 수 없다.루아 lcurses 누락 튜토리얼/axamples
약 ncurses with C language 루아 에 코드를 복제하려하지만 루아 포팅은 C 라이브러리 직접 일치가 아닙니다. 여기
두에 "Hello World"예제입니다 : 루아에서 C 코드를 복제package.path = package.path .. ';/opt/luarocks_pkg/share/lua/5.1/?.lua';
package.cpath = package.cpath.. ';/opt/luarocks_pkg/lib/lua/5.1/?.so';
local curses = require('curses');
local os = require('os');
local function main()
--start curses mode
curses.initscr()
--disable line buffering
curses.raw();
--switch off echoing
curses.echo(false);
--initialize standard screen object
local stdscr = curses.stdscr()
--clear screen
stdscr:clear();
--move cursor at (10,10) and print, here only update the stdscr structure
stdscr:mvaddstr(10,10,'Hello World');
--force curses system to dump the contents on the screen
stdscr:refresh();
--wait for keyb input
stdscr:getch();
--frees the memory taken by curses sub-system and its data structures and puts the terminal in normal mode
curses.endwin();
return(0);
end
main()
C 버전
#include <ncurses.h>
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}
많은 시간을 필요로 루아 버전 (lcurses를 사용하는 방법을 배울 수) 누군가가 나를 찾을 수있는 곳을보고 도움을 줄 수 있다면 감사하겠습니다. lcurses lua tutorial.
개발자가 라이브러리 (예 : lcurses)를 사용해야 할 때 누락 된 튜토리얼/사용법에 문제가 없다고 생각합니까? 자네는 운 좋은 남자 천재 야. 그러나 모든 개발자가 천재는 아닙니다. 누락 된 자습서는 큰 문제이므로이 문제를 해결하기위한 제안은 무엇입니까? – msalese