1. Got it, Is that why maps are so fast? They aren't analyzing? Just storing bytes? I am always looking for speed, but there is always a tradeoff. It is easier to validate everything early, but expensive. 90% of data is just looked at. Better to validate when you actually use it.
Still, but the watch list sees them both the same, so why are they not the same? They are even the same data type..
One of the reasons for using VB has always been its ability to coerce data types.
In VBA
Dim X As Long, Y As Byte, Z As String
X = 1
Y = 1
Z = 1
If X = Y Then MsgBox "True" Else MsgBox "False"
If X = Z Then MsgBox "True" Else MsgBox "False"
If Y = Z Then MsgBox "True" Else MsgBox "False"
Z = "1"
If X = Z Then MsgBox "True" Else MsgBox "False"
If Y = Z Then MsgBox "True" Else MsgBox "False"
All of these statements return true
Even in Microsoft SQL Server
DECLARE @X int = 1, @Y tinyint = 1, @Z nvarchar(5) = 1
if @X = @Y select 'true' else select 'false'
if @X = @Z select 'true' else select 'false'
if @Y = @Z select 'true' else select 'false'
SET @Z = '1'
if @X = @Z select 'true' else select 'false'
if @Y = @Z select 'true' else select 'false'
All of these things return true.
One of the Beauties of VB has always been not having to wrestle with details like this. The compiler just takes care of them.
Perhaps a compiler Switch that could coerce values so we don't have to deal with them?
I LOVE the control that B4X gives me, but at the same time it is taking me at least ten times longer to write comparable code than it does in VBA,
Edit:
Granted, a lot of that is the learning curve but still, it would be nice if B4X could do better with data types - and NULLS! - I will start another thread on that one.