Re: [Harbour] Re: Przemyslaw, I need to know your position about HB_PP_MULTILINE support
Hi Angel, Hi Viktor What rule do I have to issue to make this work ? Procedure Main cString := 'ABC' ? cString[2] // -- 'B' Return Xbase++ users are VERY used to this syntax and makes string manipulation programs much simpler. It's already implemented in xhb lib via operator overloading, so you can either use that one, or similar implementation can be copied to hbxpp (with possible adjustments to fully mimic Xbase++ behavior). You can find current implementation in these files: contrib/xhb/xhb.ch contrib/xhb/xhbcomp.prg contrib/xhb/xhbmsgs.c (for array index support, you only need just a small part of the above code) Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: Przemyslaw, I need to know your position about HB_PP_MULTILINE support
El 25/02/2010 17:28, Viktor Szakáts escribió: Hi Angel, (for array index support, you only need just a smallhank part of the above code) Brgds, Viktor Thank you ! ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: Przemyslaw, I need to know your position about HB_PP_MULTILINE support
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 On Thu, Feb 25, 2010 at 8:20 PM, Angel Pais amigo...@adinet.com.uy wrote: Now all dialect APIs can just be freely developed using some very simple rules. Brgds, Viktor Hi Viktor What rule do I have to issue to make this work ? Procedure Main cString := 'ABC' ? cString[2] // -- 'B' Return Xbase++ users are VERY used to this syntax and makes string manipulation programs much simpler. TIA Angel ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: Przemyslaw, I need to know your position about HB_PP_MULTILINE support
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
Re: [Harbour] Re: Przemyslaw, I need to know your position about HB_PP_MULTILINE support
Thanks, so the same extension exist as in xhb. I'll update SVN. Brgds, Viktor On Thu, Feb 25, 2010 at 9:18 PM, Angel Pais amigo...@adinet.com.uy wrote: 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 ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: Przemyslaw, I need to know your position about HB_PP_MULTILINE support
On Thu, 25 Feb 2010, Szak�ts Viktor wrote: Hi, Thanks, so the same extension exist as in xhb. The same as in Harbour's XHB emulation :) Real xHarbour works in a little bit different way and I intentionally haven't replicated it exactly. See USING [] OPERATOR FOR STRING ITEMS in doc/xhb-diff.txt for details. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: Przemyslaw, I need to know your position about HB_PP_MULTILINE support
Viktor Szakáts wrote: Thanks, so the same extension exist as in xhb. I'll update SVN. IFAIR, xHarbour allows off-limit indices to return an empty string. That was the main drawback, that does not help to find buggy code by RTE. F.e. 'abc'[1, 2, 3, 4, 5, 6] does not RTE. Regards, Mindaugas ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour