Skip to main content
February 14, 2024
Solved

Length function return value

  • February 14, 2024
  • 4 replies
  • 0 views

HI,
As Length function doesn't consider the null values but Can anyone explain me why the below code has returned value 4 ? Thanks

    Best answer by konduruc733182

    Hello [mention:130bfd5118334f6ba0448fca69346ec2:e9ed411860ed4f2ba0265705b8793d05] 

    The type definition of each value in your array is the reason of this effect is what I understand. when you define the value as "Three" in your array, It is a List of Variant. where as if you are defining it as a number integer it would give you the correct answer.

    4 replies

    konduruc733182
    February 14, 2024

    Hello [mention:130bfd5118334f6ba0448fca69346ec2:e9ed411860ed4f2ba0265705b8793d05] 

    The type definition of each value in your array is the reason of this effect is what I understand. when you define the value as "Three" in your array, It is a List of Variant. where as if you are defining it as a number integer it would give you the correct answer.

    harshitb6843
    February 14, 2024

    I never knew why this always happened until now. 

    I thought it was a bug with the function. Looks like my entire childhood is ruined. Thank you [mention:2df2892a4df7486f9775b4d2f0e405fd:e9ed411860ed4f2ba0265705b8793d05] !!

    konduruc733182
    February 14, 2024

    Hahaha. I realized it just a couple of weeks back. [emoticon:d6dd260102fd406884fc96b8bc59760b]