Numbers of #VARIABLEs to document.
Posted: Sun May 31, 2015 1:59 pm
I just today came up on bug hunting to a situation where i had to figure out what one variable was holding inside it. As debugprint and foreach(variable, debugprint) both failed, I used Debugprint(gettype(variable)).
However, it returned me simply "4", and that wasnt much use since i knew not what that number meant.
I had to make short program of:
to find out which one was number 4.
All in all. It would be handy having those real numbers of all #variables listed somewhere in documents. For example, when i read "gettype" documentation, it was mentioning all the names i just used in this code, and it would be natural place to also add the actual numbers.
However, it returned me simply "4", and that wasnt much use since i knew not what that number meant.
I had to make short program of:
Code: Select all
x1 = #NUMBER
DebugPrint(x1)
x2 = #STRING
DebugPrint(x2)
x3= #TABLE
DebugPrint(x3)
x4=#FUNCTION
DebugPrint(x4)
x5=#USERDATA
DebugPrint(x5)
x6=#LIGHTUSERDATA
DebugPrint(x6)
x7=#THREAD
DebugPrint(x7)
x8=#NIL
DebugPrint(x8) All in all. It would be handy having those real numbers of all #variables listed somewhere in documents. For example, when i read "gettype" documentation, it was mentioning all the names i just used in this code, and it would be natural place to also add the actual numbers.