Type testing
Author: Daniel Diaz
Keywords: GNU Prolog, manual, Prolog, compiler, constraints, finite domains

### 9.4 Type testing

- fd_var/1, non_fd_var/1, generic_var/1, non_generic_var/1

#### 9.4.1 fd_var/1, non_fd_var/1, generic_var/1, non_generic_var/1

Templates

  fd_var(?term)
  non_fd_var(?term)
  generic_var(?term)
  non_generic_var(?term)

Description

fd_var(Term) succeeds if Term is currently an FD variable.

non_fd_var(Term) succeeds if Term is currently not an FD variable (opposite of fd_var/1).

generic_var(Term) succeeds if Term is either a Prolog variable or an FD variable.

non_generic_var(Term) succeeds if Term is neither a Prolog variable nor an FD variable (opposite of generic_var/1).

Errors

None.

Portability

GNU Prolog predicate.

Copyright (C) 1999-2021 Daniel Diaz Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. More about the copyright