2011-05-19 17:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/debug/debugger.prg
* src/rtl/valtoexp.prg
+ __dbgValToStr() support for type "T"
% RTrim( Str() ) -> Str() and hb_ntos()
% hb_VALTOEXP() minor optimization
! synced string representation of codeblocks and arrays
* formatting
; TODO: to show the address instead of "pointer"?
This commit is contained in:
@@ -16,6 +16,17 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-05-19 17:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/debug/debugger.prg
|
||||
* src/rtl/valtoexp.prg
|
||||
+ __dbgValToStr() support for type "T"
|
||||
% RTrim( Str() ) -> Str() and hb_ntos()
|
||||
% hb_VALTOEXP() minor optimization
|
||||
! synced string representation of codeblocks and arrays
|
||||
* formatting
|
||||
|
||||
; TODO: to show the address instead of "pointer"?
|
||||
|
||||
2011-05-19 08:31 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/ideedit.prg
|
||||
* contrib/hbide/ideeditor.prg
|
||||
|
||||
@@ -3378,14 +3378,15 @@ FUNCTION __dbgValToStr( uVal )
|
||||
|
||||
DO CASE
|
||||
CASE uVal == NIL ; RETURN "NIL"
|
||||
CASE cType == "B" ; RETURN "{ || ... }"
|
||||
CASE cType == "B" ; RETURN "{|| ... }"
|
||||
CASE cType == "A" ; RETURN "{ ... }"
|
||||
CASE cType $ "CM" ; RETURN '"' + uVal + '"'
|
||||
CASE cType == "L" ; RETURN iif( uVal, ".T.", ".F." )
|
||||
CASE cType == "D" ; RETURN DToC( uVal )
|
||||
CASE cType == "N" ; RETURN RTrim( Str( uVal ) )
|
||||
CASE cType == "T" ; RETURN hb_TToC( uVal )
|
||||
CASE cType == "N" ; RETURN Str( uVal )
|
||||
CASE cType == "O" ; RETURN "Class " + uVal:ClassName() + " object"
|
||||
CASE cType == "H" ; RETURN "Hash of " + RTrim( Str( Len( uVal ) ) ) + " elements"
|
||||
CASE cType == "H" ; RETURN "Hash of " + hb_ntos( Len( uVal ) ) + " elements"
|
||||
CASE cType == "P" ; RETURN "Pointer"
|
||||
ENDCASE
|
||||
|
||||
@@ -3405,10 +3406,10 @@ FUNCTION __dbgCStr( xVal )
|
||||
CASE "T" ; RETURN 't"' + hb_TSToStr( xVal, .T. ) + '"'
|
||||
CASE "L" ; RETURN iif( xVal, ".T.", ".F." )
|
||||
CASE "S" ; RETURN "@" + xVal:name + "()"
|
||||
CASE "B" ; RETURN "{||...}"
|
||||
CASE "B" ; RETURN "{|| ... }"
|
||||
CASE "O" ; RETURN "{ " + xVal:className + " Object }"
|
||||
CASE "A" ; RETURN "{ Array of " + hb_NToS( Len( xVal ) ) + " Items }"
|
||||
CASE "H" ; RETURN "{ Hash of " + hb_NToS( Len( xVal ) ) + " Items }"
|
||||
CASE "A" ; RETURN "{ Array of " + hb_ntos( Len( xVal ) ) + " Items }"
|
||||
CASE "H" ; RETURN "{ Hash of " + hb_ntos( Len( xVal ) ) + " Items }"
|
||||
CASE "P" ; RETURN "<pointer>"
|
||||
OTHERWISE
|
||||
IF xVal == NIL
|
||||
|
||||
@@ -57,63 +57,47 @@ FUNCTION hb_VALTOEXP( xVal )
|
||||
LOCAL v := ValType( xVal )
|
||||
|
||||
SWITCH v
|
||||
CASE "C"
|
||||
CASE "M"
|
||||
cVal := hb_StrToExp( xVal )
|
||||
EXIT
|
||||
CASE "N"
|
||||
cVal := hb_NToS( xVal )
|
||||
EXIT
|
||||
CASE "D"
|
||||
cVal := iif( Empty( xVal ), "0d00000000", "0d" + DToS( xVal ) )
|
||||
EXIT
|
||||
CASE "T"
|
||||
cVal := 't"' + hb_TSToStr( xVal, .T. ) + '"'
|
||||
EXIT
|
||||
CASE "L"
|
||||
cVal := iif( xVal, ".T.", ".F." )
|
||||
EXIT
|
||||
CASE "S"
|
||||
cVal := "@" + xVal:name + "()"
|
||||
EXIT
|
||||
CASE "A"
|
||||
CASE "C"
|
||||
CASE "M" ; RETURN hb_StrToExp( xVal )
|
||||
CASE "N" ; hb_ntos( xVal )
|
||||
CASE "D" ; RETURN iif( Empty( xVal ), "0d00000000", "0d" + DToS( xVal ) )
|
||||
CASE "T" ; RETURN 't"' + hb_TSToStr( xVal, .T. ) + '"'
|
||||
CASE "L" ; RETURN iif( xVal, ".T.", ".F." )
|
||||
CASE "S" ; RETURN "@" + xVal:name + "()"
|
||||
CASE "A"
|
||||
cVal := "{"
|
||||
FOR EACH v IN xVal
|
||||
cVal += iif( v:__enumIndex() == 1, "", ", " ) + hb_ValToExp( v )
|
||||
NEXT
|
||||
cVal += "}"
|
||||
EXIT
|
||||
CASE "O"
|
||||
cVal := "__objSetClass( {"
|
||||
FOR EACH v IN xVal
|
||||
cVal += iif( v:__enumIndex() == 1, "", ", " ) + hb_ValToExp( v )
|
||||
NEXT
|
||||
cVal += "}, '" + xVal:className() + "')"
|
||||
EXIT
|
||||
CASE "H"
|
||||
IF Empty( xVal )
|
||||
cVal := "{=>}"
|
||||
ELSE
|
||||
cVal := "{"
|
||||
FOR EACH v IN xVal
|
||||
cVal += iif( v:__enumIndex() == 1, "", ", " ) + hb_ValToExp( v )
|
||||
cVal += iif( v:__enumIndex() == 1, "", ", " ) + ;
|
||||
hb_ValToExp( v:__enumKey() ) + "=>" + hb_ValToExp( v )
|
||||
NEXT
|
||||
cVal += "}"
|
||||
EXIT
|
||||
CASE "O"
|
||||
cVal := "__objSetClass( {"
|
||||
FOR EACH v IN xVal
|
||||
cVal += iif( v:__enumIndex() == 1, "", ", " ) + hb_ValToExp( v )
|
||||
NEXT
|
||||
cVal += "}, '" + xVal:className() + "')"
|
||||
EXIT
|
||||
CASE "H"
|
||||
IF Empty( xVal )
|
||||
cVal := "{=>}"
|
||||
ELSE
|
||||
cVal := "{"
|
||||
FOR EACH v IN xVal
|
||||
cVal += iif( v:__enumIndex() == 1, "", ", " ) + ;
|
||||
hb_ValToExp( v:__enumKey() ) + "=>" + hb_ValToExp( v )
|
||||
NEXT
|
||||
cVal += "}"
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "P"
|
||||
cVal := "<pointer>"
|
||||
EXIT
|
||||
CASE "B"
|
||||
cVal := "{|| ... }"
|
||||
EXIT
|
||||
OTHERWISE
|
||||
IF xVal == NIL
|
||||
cVal := "NIL"
|
||||
ELSE
|
||||
cVal := "???:" + v
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "P" ; RETURN "<pointer>"
|
||||
CASE "B" ; RETURN "{|| ... }"
|
||||
OTHERWISE
|
||||
IF xVal == NIL
|
||||
cVal := "NIL"
|
||||
ELSE
|
||||
cVal := "???:" + v
|
||||
ENDIF
|
||||
ENDSWITCH
|
||||
|
||||
RETURN cVal
|
||||
@@ -129,10 +113,10 @@ FUNCTION hb_CStr( xVal )
|
||||
CASE "T" ; RETURN 't"' + hb_TSToStr( xVal, .T. ) + '"'
|
||||
CASE "L" ; RETURN iif( xVal, ".T.", ".F." )
|
||||
CASE "S" ; RETURN "@" + xVal:name + "()"
|
||||
CASE "B" ; RETURN "{||...}"
|
||||
CASE "B" ; RETURN "{|| ... }"
|
||||
CASE "O" ; RETURN "{ " + xVal:className + " Object }"
|
||||
CASE "A" ; RETURN "{ Array of " + hb_NToS( Len( xVal ) ) + " Items }"
|
||||
CASE "H" ; RETURN "{ Hash of " + hb_NToS( Len( xVal ) ) + " Items }"
|
||||
CASE "A" ; RETURN "{ Array of " + hb_ntos( Len( xVal ) ) + " Items }"
|
||||
CASE "H" ; RETURN "{ Hash of " + hb_ntos( Len( xVal ) ) + " Items }"
|
||||
CASE "P" ; RETURN "<pointer>"
|
||||
OTHERWISE
|
||||
IF xVal == NIL
|
||||
|
||||
Reference in New Issue
Block a user