Multidimensional array issue

Mark Wieder ahsoftware at sonic.net
Tue Mar 9 11:13:56 EST 2021


On 3/8/21 9:16 PM, Phil Davis via use-livecode wrote:
> When I want to determine whether or not an array element contains 
> non-whitespace, I usually say:
> 
>      if word 1 of tDataA["item"] is empty then ... (or is NOT empty)

The problem with that is that it doesn't differentiate between an empty 
array element and a nonexisting one:

local tArray
put empty into tArray["foo"]
put word 1 of tArray["foo"] is empty # true
put word 1 of tArray["bar"] is empty # true
breakpoint # will show that only tArray["foo"] exists

-- 
  Mark Wieder
  ahsoftware at gmail.com




More information about the use-livecode mailing list