bitbucket.org
Originally posted on Harbour Project Facebook Group
This is the successor to Clipper... Clipper... Clipper, a popular & well-linked CA-Clipper website which I started in 1995 and which went offline in 2002
### 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[2], s[4], s[6] s[2] := lower( s[2] ) s[4] := lower( s[4] ) s[6] := lower( s[6] ) ?? " =>", 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[0] + "<", ">" + s[1000] + "<" 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.
This site started out as a teeny-weeny section of Who the heck is Chee Chong Hwa ? and has graduated into a full blown web site of more than 140 pages (actually hundreds of A4 size pages) ! This is due to its growing popularity and tremendous encouragements from visiting Clipperheads from 100 countries worldwide, from North America, Central America, Caribbean, South America, Europe, Middle-East, Africa and Asia-Pacific. Thanx Clipperheads, you all made this happen !
Well, Clipper or to be precise, CA-Clipper is the premier PC-Software development tool for DOS. It was first developed by Nantucket Corporation initially as a compiler for dBase3+ programs. Since then, CA-Clipper has evolved away from its x-base roots with the introduction of lexical scoping & pre-defined objects like TBrowse. As at today, the most stable version ofClipper is 5.2e while the latest version, 5.3a was introduced on 21 May 1996.
As at 11th November, 1996, an unofficial 5.3a fixes file was made available by Jo French. See the About CA-Clipper 5.3a section for more details. BTW, Jo French uploaded the revised 5.3a fixes file on 20th November, 1996.
The latest news is that CA has finally released the long-awaited 5.3b patch on 21 May, 1997.
For 5.3b users, you must a take a look at Jo French's comments on unfixed bugs in 5.3b.
BTW, have you used Click ? If you're a serious Clipperprogrammer and need an excellent code formatter, Click is a natural choice. How to get it ? Simple, access Phil Barnett's site via my Cool Clipper Sites.
Anyway, you should visit the Alaska Home Page. Give it a chance and then draw your own conclusions !.
According to counter.digits.com, you are visitor since 3 June 1996.
If you like or dislike what you see on this website, please drop me a line by clicking the email button at the bottom of this page or better still, by filling out the form in my guest book. If you are not sure what to write,click here to take a look at what other Clipperheads have to say.