El 25/02/2010 17:43, Viktor Szakáts escribió:
Angel,
Can you tell, if Xbase++ support negative indexes
in 'string[ n ]' operations?
I'd also be interested in the error messages you get
when using off limit or zero index.
Brgds,
Viktor
Sure !!!
See next:
PROCEDURE Main
LOCAL cString := 'ABCDEFGHIJ'
? ' 2 '+cString[ 2] // ----> B
? '-2 '+cString[-2] // ----> I
? ' 0 '+cString[ 0] // ----> ERRORLOG A
? '15 '+cString[15] // ----> ERRORLOG B
RETURN
/*
ERRORLOG A
ERROR LOG of "C:\xb-test\TEST.EXE" Date: 02/25/2010 18:11:44
Xbase++ version : Xbase++ (R) Version 1.90.355
Operating system : Windows XP 05.01 Build 02600 Service Pack 2
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: C VALUE: ABCDEFGHIJ
-> VALTYPE: N VALUE: 0
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : Error in array index
oError:filename :
oError:genCode : 4
oError:operation : <Cc of 10>[<0>]
oError:osCode : 0
oError:severity : 2
oError:subCode : 1012
oError:subSystem : BASE
oError:thread : 1
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from MAIN(6)
ERRORLOG B
------------------------------------------------------------------------------
ERROR LOG of "C:\xb-test\TEST.EXE" Date: 02/25/2010 18:15:28
Xbase++ version : Xbase++ (R) Version 1.90.355
Operating system : Windows XP 05.01 Build 02600 Service Pack 2
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: C VALUE: ABCDEFGHIJ
-> VALTYPE: N VALUE: 15
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : Error in array index
oError:filename :
oError:genCode : 4
oError:operation : <Cc of 10>[<15>]
oError:osCode : 0
oError:severity : 2
oError:subCode : 1012
oError:subSystem : BASE
oError:thread : 1
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from MAIN(7)
*/
HTH
Angel
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour