Multiple choice technology programming languages

W01_VAR a X(6) variable is assigned the value 'IDEAL' W01_LEN is defined as U Z(1) The output of the following code is Set W01_LENGTH = $LEN(W01_VAR) LIST W01_LENGTH

  1. 3

  2. 6

  3. 5

  4. 4

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The $LEN function in IDEAL returns the defined length of a field, not its actual content length. W01_VAR is defined as X(6), meaning it has a fixed length of 6 characters regardless that it contains 'IDEAL' (5 characters). The $LEN function returns 6 because that's the defined length of the variable. The LIST command displays this value.