Page 2 of 2
Re: Show constant as constant name in Variable Viewer
Posted: Sat Sep 14, 2013 2:26 pm
by Korolev Michael
I mean debug session, not code itself.
During debug session, try to go through loops and watch at VV. Info in VV presented by raw numbers, I can't determine what status of object I have at this moment of time, until rummage in pbi-file with headers.
And If all constants were created with Enumetation function? What will you do?
Re: Show constant as constant name in Variable Viewer
Posted: Sat Sep 14, 2013 3:53 pm
by Tenaja
I think it would be enough (preferred) to have a new tab in the Variable Viewer that (along with variables, arrays, lists, maps) listed all constants.
...and that list could be sorted by order of definition, alphabetically OR by value.
Re: Show constant as constant name in Variable Viewer
Posted: Sat Sep 14, 2013 3:59 pm
by skywalk
The solution is in your Title:
Show constant <xx xxxxxxxx xxxx> in Variable Viewer.
Macro created constants are only available with explicit Debug commands or assignments to variable.
It would help to list all constants/enum's in the Variable Viewer.
Re: Show constant as constant name in Variable Viewer
Posted: Sat Sep 14, 2013 4:34 pm
by Danilo
Korolev Michael wrote:And If all constants were created with Enumetation function? What will you do?
Code: Select all
Enumeration Enum1
#Failure
#Success
EndEnumeration
;
; var is of type "Enumeration Enum1"
; and only values of Enum1 can be assigned to it
;
var.Enum1 = #Success
Debug var ; outputs "#Success"
Doesn't work in PureBasic, but it looks like it is what you want (works like this in some other programming languages).
Re: Show constant as constant name in Variable Viewer
Posted: Tue Sep 17, 2013 6:20 am
by Korolev Michael
@Danilo, almost.