### USING  OPERATOR FOR STRING ITEMS ### ================================================ xHarbour supports using  operator to access single characters in string items. Harbour doesn't by default but it has strong enough OOP API to allow adding such extension without touching core code even by user at .prg level. It was implemented in Harbour in XHB.LIB. This code can be compiled and executed by both compilers: #ifndef __XHARBOUR__ #include "xhb.ch" // add xHarbour emulation to Harbour #endif proc main() local s := "ABCDEFG" ? s, "=>", s, s, s s := lower( s ) s := lower( s ) s := lower( s ) ?? " =>", s return Warning!. There is one difference in above implementation introduced intentionally to Harbour. xHarbour never generates errors for wrong indexes in  operator used for string items but simply returns "", f.e. add to above code: ? ">" + s + "<", ">" + s + "<" If  operator is used for other type of items RTE is generated. Harbour will generate RTE in all cases. If someone needs strict XHB compatibility here then he should adopt code overloading  operator for strings in XHB.LIB for his own preferences removing the RTE.
Wednesday, October 19, 2011
Harbour/xharbour Diff :13/57 - USING  OPERATOR FOR STRING ITEMS - Przemyslaw Czerpak
Welcome to Clipper... Clipper... Clipper
In 1997, then using Delphi 3, I had already created 32-bits Windows applications for HRIS, ERP and CRM. In 2007, using Ruby on Rails, an AJAX powered CRM site running on Apache & MySQL was created and I am now using Visual Studio .Net 2008 to create web-based projects and Delphi 7 for Win32 applications using SQL2005 & DBFCDX.
So, why then am I reviving the Original Clipper... Clipper... Clipper via a Blog as CA-Clipper is a programming language for the DOS world ? Believe it or not, there are still some clients using my mission-critical CA-Clipper applications for DOS installed in the late 80's and up to the mid 90's. This is testimony to CA-Clipper's robustness as a language :-)
With the widespread introduction of Windows 7 64-bits as the standard O/S for new Windows based PCs & Notebooks, CA-Clipper EXE simply will not work and it has become imperative for Clipper programmers to migrate immediately to Harbour to build 32/64 bits EXEs
Since 28th January 2009, this blog has been read by 134,389 (10/3/11 - 39,277) unique visitors (of which 45,151 (10/3/11 - 13,929) are returning visitors) from 103 countries and 1,574 cities & towns in Europe (37; 764 cities), North America (3; 373 cities) , Central America & Caribeans (6; 13 cities), South America(10; 226 cities), Africa & Middle-East (12; 44 cities) , Asia-Pacific (21; 175 cities). So, obviously Clipper is Alive & Well : -)
TIA & Enjoy ! (10th October 2012, 11:05; 13th November 2015)