Unassigned function

Tests if a variable has been assigned. Returns True (1) if the variable is unassigned and False (0) if the variable is assigned - the opposite result from the assigned() function.

truefalse = Unassigned(variable)

The unassigned() function is used to determine whether a value has been assigned to a variable. You can avoid "variable not assigned a value" (VNAV) errors, by making sure that any variable you reference in your code has, at minimum, a null value.

Note: A null value is different from an unassigned value. A null value is a known, assigned value of '' . If a variable is unassigned it has an unknown value.

Note: The unassigned() function requires a function declaration. The assigned() function does not require a function declaration.

True (1) if variable is unassigned; false (0) if variable is assigned.

function RowExists(Table, Key)
declare function unassigned
$insert Logical
Exists = FALSE$
if not(unassigned(Table)) and not(unassigned(Key)) then
  open Table to Handle then
    read Row from Handle, Key then
      Exists = TRUE$
    end
  end
end
return Exists
  • guides/programming/programmers_reference_manual/unassigned.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1