Hi,
The following demo code illustrates the issue I am running into:
In this state, the output is (if I enter 2 as a number):
variable type: Integer(4)
test1: 4 : 00
variable type: Integer(4)
test2: 4 : 04
If I uncomment the $m_nTemp = number( $m_nTemp ) line, then I have the same output.
If I uncomment the $m_nTemp = string( $m_nTemp ) line, then the output becomes correct (which is what you would not expect as the documentation specifies that the input should be an integer or binary type):
variable type: String(1) 4
test1: 4 : 04
variable type: Integer(4)
test2: 4 : 04
So this seems to be a bug in hex ?
Autoit v3.3.8.1
The following demo code illustrates the issue I am running into:
$m_nTemp = InputBox("Bang", "Enter number", "" ) $m_nTemp = $m_nTemp * 2 ;$m_nTemp = number( $m_nTemp ) ;$m_nTemp = string( $m_nTemp ) ConsoleWrite( "variable type: " & _VarDump( $m_nTemp ) & @CRLF ) ConsoleWrite("test1: " & $m_nTemp & " : "& hex( $m_nTemp, 2 ) & @CRLF ) $m_nTemp = 4 ConsoleWrite( "variable type: " & _VarDump( $m_nTemp ) & @CRLF ) ConsoleWrite("test2: " & $m_nTemp & " : "& hex( $m_nTemp, 2 ) & @CRLF ) Func _VarDump(ByRef $vVar, $sIndent = '', $IsSupposedToBeUnknown = False) Select Case $IsSupposedToBeUnknown Return 'Unknown(' & $vVar & ')' Case IsDllStruct($vVar) Return 'Struct(' & DllStructGetSize($vVar) & ')' Case IsArray($vVar) Return 'Array' & @CRLF & _VarDumpArray($vVar, $sIndent) Case IsBinary($vVar) Return 'Binary(' & BinaryLen($vVar) & ')' Case IsBool($vVar) Return 'Boolean(' & $vVar & ')' Case IsFloat($vVar) Return 'Float(' & $vVar & ')' Case IsHWnd($vVar) Return 'HWnd(' & $vVar & ')' Case IsInt($vVar) Return 'Integer(' & $vVar & ')' Case IsKeyword($vVar) Return 'Keyword(' & $vVar & ')' Case IsObj($vVar) Return 'Object(' & ObjName($vVar) & ')' Case IsString($vVar) Return 'String(' & StringLen($vVar) & ') ' & $vVar Case Else Return 'Unknown(' & $vVar & ')' EndSelect EndFunc
In this state, the output is (if I enter 2 as a number):
variable type: Integer(4)
test1: 4 : 00
variable type: Integer(4)
test2: 4 : 04
If I uncomment the $m_nTemp = number( $m_nTemp ) line, then I have the same output.
If I uncomment the $m_nTemp = string( $m_nTemp ) line, then the output becomes correct (which is what you would not expect as the documentation specifies that the input should be an integer or binary type):
variable type: String(1) 4
test1: 4 : 04
variable type: Integer(4)
test2: 4 : 04
So this seems to be a bug in hex ?
Autoit v3.3.8.1