FoxPro function list updated
Posted: Tue Feb 11, 2020 3:27 pm
Thomas,
We decided to do Substr() that way so we can allow all kind of "strange" parameter values, such as a negative 3rd parameter. We could add many overloads, but this was simply easier.
For functions inside Core we could not do XBase style parameters because we do not have a USUAL type there.
For functions such as GETFLDSTATE I would prefer to have simply one implementation that checks for valid parameter types. Even if you write overloads for the parameter you will still have to check for the validity of the fieldname, field number, area number and/or the table alias.
If you create overloads then you would have to create duplicate checks and I don't think that is a good idea.
I have no idea what Python-Slice does, but our rule of thumb has been that we do not add extra "strange" behaviour, such as negative start positions, unless one of the dialects already supports that.
Robert
We decided to do Substr() that way so we can allow all kind of "strange" parameter values, such as a negative 3rd parameter. We could add many overloads, but this was simply easier.
For functions inside Core we could not do XBase style parameters because we do not have a USUAL type there.
For functions such as GETFLDSTATE I would prefer to have simply one implementation that checks for valid parameter types. Even if you write overloads for the parameter you will still have to check for the validity of the fieldname, field number, area number and/or the table alias.
If you create overloads then you would have to create duplicate checks and I don't think that is a good idea.
I have no idea what Python-Slice does, but our rule of thumb has been that we do not add extra "strange" behaviour, such as negative start positions, unless one of the dialects already supports that.
Robert