Re-sending to list, yet AGAIN :)
---------- Forwarded message ----------
From: Bogdan Marinescu <bogdan.marinescu at gmail.com>
Date: Mon, Sep 29, 2008 at 3:55 PM
Subject: Re: [Elua-dev] Some questions
To: dado at pobox.com
Hi! Please see below.
On Mon, Sep 29, 2008 at 2:42 PM, Dado Sutter <dadosutter at gmail.com> wrote:
> Hello eLuers :)
> Just a couple of questions on the current shell and the term module:
>
> - Is there a way to rerun the last RECVed program on the shell/eLua ? When
> a Lua program terminates, is there a way to run it without flashing the
> memory again ?
>
At this point, no. The RECV buffers are emptied as soon as the program ends
to save memory. Your best bet is to enclose your program in a "while true do
... end" loop.
>
>
> - In the Terminal module, is there a function to handle string input (ENTER
> terminated) on the term or do we have to handle the chars and implement it ?
>
No, but I think you can use the 'standard way', which is (if I recall
correctly) something like
local data = io.stdin:read("*l").
Since both term and stdin use the UART, this should work.
Best,
Bogdan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://lists.berlios.de/pipermail/elua-dev/attachments/20080929/ca01c662/attachment.html