Hi Thomas
>> I note also you're making your arrays reference from 0 instead of 1. While more compatible with other languages,
>> it is not compatible with existing VFP / XBASE code. You might want to have some kind of SET ARRAYBASE TO 0 | 1
>> setting somewhere, which allows the base to be 1 instead of 0, in which case you should use:
Sorry maybe I was not clear enough. ALL XBase interfaces are 1 based, so no worry about 0 index. It is only .NET which is by default 0 based that are affected by the /az switch.
Question 1: Does this map over to Strings ?
clea
lx = "Do_xSharp"
? LEFT(lx,3)
? SUBSTR(lx, 4)
? Left(lx,2) = Substr(lx,1,2)
> Question 2: what happens if you get code from a coder working 1 based ? Lets say you want my Array-based-Collection class routines, well tested but coded 1 based ?
> That could end in a wreck, same as messing with UDFPARMS, as code is written "with a mind set". Only thing is to bury the array so no outsider can access it and wrap
> all indices in methods.
Ok, again no worry for XBase code, /az is only applicable to .NET Arrays. XBase features always 1 based. I interface a lot to c# asseblies hence I prefer to always have /az turned on.
> Question 3: What are the functions for AStartElement(myArray, "/az") and
Function AEndElement(@myArray, tcSwitch)
return Alen(myArray, m.tcSwitch)
> as my typical shorthand is for lnRun = 1 to Alen(laWork)... which could lead to serial FACEPALMs if you use my code recompiled to your switch or passed
> an array-parameter compiled under your switch ?...
Alen() is a XBase function hence always 1 to Length. .NET same except with /az set, it will be 0 to Length - 1