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)

P#60679 2019-01-08 14:10 ( Edited 2023-06-10 07:37)

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.

P#130746 2023-06-10 07:47

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 13:42:30 | 0.011s | Q:16