01-07-2020 03:28 PM - edited 01-07-2020 03:32 PM
I am trying to use the Additional Results teststand step to log an Array element (which is a cluster of numeric values) after it is iterated through a for loop. The problem is that I want the value to be displayed as in HEX format not decimal. So instead of logging "2015" in the report I want it to log "0x7DF" Instead. See my current step settings below:
Any idea how to force the step to log these numeric values in hex format?
Thanks
01-07-2020 04:37 PM
Try right clicking on the local variable field, select Numeric Format, and choose hex. That worked to get the hex format into the report for me in a simple test case.
01-07-2020 05:07 PM
I have tried that and it doesnt seem to have any impact on the logged result in this case. Also how would this work in a case where the local is an array with an "empty" bounds? My point is I don't think that is a very flexible solution unfortunately.
Thanks
01-08-2020 10:28 AM
I'm not sure about the details of your sequence, but I've attached a sequence that logs locals.a, which appears in the report as decimal. It also logs locals.hexformat = locals.a, which logs the same value but it appears in the report as hex.
09-07-2023 04:08 AM
You can try
str(variableName, "%x")