Simple text user interface question
Vlad Dumitrescu
vlad_dumitrescu@REDACTED
Thu Aug 4 08:08:51 CEST 2005
>I have to insert records in a database and would like to print the number
inserted so far on a console. Is
>there an easy way (without using slang, etc) to print the number always on
the same line, the new
>number overwriting the prior one (something like asking for a carriage
return without a line feed)?
Hi,
The short answer is "not in a portable way".
The long answer is "you can hack something up, for your own machine and
environment, but it's probably more work than it's worth".
What's needed? Look up your terminal's capabilities, and use them from
Erlang. I did once a small library that used ANSI codes to steer the cursor
and put some colors on the screen. Worked nice, but of course the output
will be jumbled-up on terminals with no ANSI support...
regards,
Vlad
More information about the erlang-questions
mailing list