Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tests if a variable has been assigned. Returns the opposite values from unassigned().

Syntax

Code Block
truefalse = Assigned(variable)

...

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 assigned; false (0) if variable is unassigned.

See also

unassigned()

Example

Code Block
function RowExists(Table, Key)
$insert Logical
Exists = FALSE$
if assigned(Table) and assigned(Key) then
  open Table to Handle then
    read Row from Handle, Key then
      Exists = TRUE$
    end
  end
end
return Exists