Logtalk reference manual
Conditional compilation directive: if/1
Contents > Reference Manual > Directives > if/1

## if/1

#### Description

    if(Goal)

Starts conditional compilation. The code following the directive is compiled if `Goal` is true. The goal is subjected to goal expansion when the directive occurs in a source file.

#### Template and modes

    if(@callable)

#### Examples

    :- if(current_prolog_flag(double_quotes, atom)).

#### See also

`elif/1`, `else/0`, `endif/0`