Log In  


Cart #vdmplua-4 | 2023-06-10 | Code ▽ | Embed ▽ | No License
3

Feature Overview

  • DMP() prints values, table internals.
  • Stop the routine.
  • Clear Screen.
  • Display the contents of the specified table.
  • The order in which the associative array table is displayed is undefined.
  • Use the left, right, up, and down keys to scroll the screen and check the contents.
  • This function consumes 168 Tokens.
local t={
 1
,str="string"
,obj={"o","b","j","e","c","t"}
,{{{}}}
,{nil,true,false,function()end}
}
dmp(t)

Symbol summary

#  Number
$  String
%  Boolean
*  Function(output only the "[Function]")
!  nil(table pairs() skips nil, so it is not shown.)
{} Table

This function is included in the KNUTIL library.

release note


v0.5

  • add _update_buttons() (enable btnp in goto loop in _update thread)

v0.4

  • scrollable output.
  • exit with pause key.
  • additional colors for each type.
  • support for table display with 0 elements.
  • returns the result as a string.
  • simplified line feed concatenation.

v0.3

  • fixed comment

v0.2

  • name change: [ vdmp->dmp ]
  • remove value for print position.
  • add the type identifier
    before the table key.

v0.1

  • first release(vdmp)

3


I have updated DMP() to v0.5!

add _update_buttons() (enable btnp in goto loop in _update thread)

The previous problem was that if we did a dmp() in an _update() or _draw() thread, btnp() to exit the screen was not recognized, so btn() was substituted.
As a compensation, successive dmp() statements were skipping subsequent dmp() when exiting the screen.
_update_buttons() has become a way to solve that problem for now.



[Please log in to post a comment]