trying to get a clear picture on the different NULLs in xSharp.
On Bandol 2.2 there is a list of "Null Literals", which at least is missing an entry for NULL_DATETIME and perhaps for NULL_CURRENCY - second OTOH might be handled via nullable 8-bit int behind currency.
Topic of NIL is sometimes mentioned, but has no own entry beyond "NILs, assigning default values" which makes no sense to me, as it is unclear if "Assign a default value to a NIL argument" is meant for Core or VO dialect, as vfp casts missing parameters to false booleans.
Dotnet has (besides none member in various classes) its own speciality: the DBNull different from Null used on vars, see for instance
https://www.c-sharpcorner.com/blogs/han ... n-c-sharp1
and DBNull is not mentioned in xSharp docs on 2.2
Vfp memory uses "handles" as possible data type, but these handles either point to an object or other data type (including option to assign NULL value / NULL value assigned if Form is released), OTOH nullable vfp data columns can be updated/replaced with such NULL values - at the moment I see nothing mirroring the null / DBNull split of Dotnet.
Can you shed some light on how this works in xSharp ? Is "memory null" automatically transferred into DBNull and vice versa ?
Found in xSharpRDD.../DbfFPt.Prg
Code: Select all
CASE FlexArrayTypes.NIL
element := DBNull.Value
Code: Select all
CASE TypeCode.DBNull
RETURN __UsualType.Object
Code: Select all
var typeCode := System.Type.GetTypeCode(vartype)
switch typeCode
case System.TypeCode.DBNull
self:_flags:usualType := UsualType.Void
self:_refData := null
Cannot say I have a clear mental picture
Why ask now ? Because Robert hinted at public 2.4a release soon. All those NULL errors in String and possibly other RT functions should be doable after hammering out a schema with dev team on how and where (Vfp only? Or inside Core level?) to fix by coders outside dev team and work can be done on a current release without worry of missing something already changed in in-between FOX-only versions.
Might be better if such issues can be summed up as in "known, worked on already" as a single issue entry if new vfp coders can be enticed to test as more vfp functionality is implemented - adding a few dozen entries basically amounting to NULL-handling differences would only fog the issue and inflate issue count beyond reasonable, creating a wrong opinion on the hurdles to take till usable. Vfp IsNull() and NVL() functions could probably handled en passant.
my 0.22€ (might take a few cents worth of fixing if nobody steps up)
Thomas