Terminal alternative
|
12-19-2014, 05:13 PM
(This post was last modified: 12-25-2014 04:24 PM by Snorre.)
Post: #1
|
|||
|
|||
Terminal alternative
Hello,
this program is borrowed from the german HP-Prime forum. It was written because the builtin terminal has some drawbacks (which were introduced in some recent firmware update) -- mainly very size-limited line buffer and not displaying the most recent PRINTed line. Beware: This program does not break long lines as the builtin terminal would do, and G9 is used as drawing buffer. Program "TERM": Code: EXPORT LiveView:=1; // Visible while outputting? Usage: Replace "PRINT()" by "TERM.CLEAR()", "PRINT(data)" by "TERM.OUT(data)", and call "TERM.SHOW()" to view the buffer. (Omit the prefix "TERM." if "CLEAR", "OUT", "SHOW" don't collide with other function names). If "TERM.LiveView" is set to 0 the program won't display anything until "SHOW()"ed. Scroll to top/bottom by cursoring left/right, or otherwise 1/3-page up/down. Keys [1],...,[7],[+],[-] will change font size. Test program "TERMTEST" for comparing builtin terminal vs. "TERM": Code: EXPORT TERMTEST1() Any improvements are very welcome. Ideas: handle line breaks, long lines, tabulators, highlight numbers, better type handling in general etc. This program might become obsolete eventually, when the Prime's builtin terminal is upgraded. Greetings [EDIT] Thread renamed to not disrupt the sequence of "HP Prime: ..." articles by E. W. Shore when alphabetically sorted. |
|||
06-04-2017, 06:33 PM
(This post was last modified: 06-04-2017 06:57 PM by Freire.)
Post: #2
|
|||
|
|||
RE: Terminal alternative
Althought this is an old post, this Terminal is very good.
Suggestions to code: -Scroll bar a bit larger and bit more precision by moving it through it's midpoint instead of top point. -Change in OUT(data) to deal with strings that are larger than a Line, to be printed in 2 lines. -Fancy Header. PS: This is not the most elegant and is a bit imprecise but works better than before. The way of cutting strings into two lines is far from good. New Code: Code: //========================================== Changed Parts: Code: //========================================== |
|||
06-06-2017, 07:58 PM
(This post was last modified: 06-06-2017 08:05 PM by compsystems.)
Post: #3
|
|||
|
|||
RE: Terminal alternative
2 new cmds
PHP Code: //========================================== file: testTerm.hpprgm PHP Code: //file: testTerm.hpprgm |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)