This file is indexed.

/usr/lib/swi-prolog/doc/Manual/flags.html is in swi-prolog-nox 6.6.4-2ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<title>SWI-Prolog 7.1.10 Reference Manual: Section 2.11</title><link rel="home" href="index.html">
<link rel="contents" href="Contents.html">
<link rel="index" href="DocIndex.html">
<link rel="summary" href="summary.html">
<link rel="previous" href="compilation.html">
<link rel="next" href="hooks.html">

<style type="text/css">

/* Style sheet for SWI-Prolog latex2html
*/

dd.defbody
{ margin-bottom: 1em;
}

dt.pubdef, dt.multidef
{ color: #fff;
padding: 2px 10px 0px 10px;
margin-bottom: 5px;
font-size: 18px;
vertical-align: middle;
overflow: hidden;
}

dt.pubdef { background-color: #0c3d6e; }
dt.multidef { background-color: #ef9439; }

.bib dd
{ margin-bottom: 1em;
}

.bib dt
{ float: left;
margin-right: 1.3ex;
}

pre.code
{ margin-left: 1.5em;
margin-right: 1.5em;
border: 1px dotted;
padding-top: 5px;
padding-left: 5px;
padding-bottom: 5px;
background-color: #f8f8f8;
}

div.navigate
{ text-align: center;
background-color: #f0f0f0;
border: 1px dotted;
padding: 5px;
}

div.title
{ text-align: center;
padding-bottom: 1em;
font-size: 200%;
font-weight: bold;
}

div.author
{ text-align: center;
font-style: italic;
}

div.abstract
{ margin-top: 2em;
background-color: #f0f0f0;
border: 1px dotted;
padding: 5px;
margin-left: 10%; margin-right:10%;
}

div.abstract-title
{ text-align: center;
padding: 5px;
font-size: 120%;
font-weight: bold;
}

div.toc-h1
{ font-size: 200%;
font-weight: bold;
}

div.toc-h2
{ font-size: 120%;
font-weight: bold;
margin-left: 2em;
}

div.toc-h3
{ font-size: 100%;
font-weight: bold;
margin-left: 4em;
}

div.toc-h4
{ font-size: 100%;
margin-left: 6em;
}

span.sec-nr
{
}

span.sec-title
{
}

span.pred-ext
{ font-weight: bold;
}

span.pred-tag
{ float: right;
padding-top: 0.2em;
font-size: 80%;
font-style: italic;
color: #fff;
}

div.caption
{ width: 80%;
margin: auto;
text-align:center;
}

/* Footnotes */
.fn {
color: red;
font-size: 70%;
}

.fn-text, .fnp {
position: absolute;
top: auto;
left: 10%;
border: 1px solid #000;
box-shadow: 5px 5px 5px #888;
display: none;
background: #fff;
color: #000;
margin-top: 25px;
padding: 8px 12px;
font-size: larger;
}

sup:hover span.fn-text
{ display: block;
}

/* Lists */

dl.latex
{ margin-top: 1ex;
margin-bottom: 0.5ex;
}

dl.latex dl.latex dd.defbody
{ margin-bottom: 0.5ex;
}

/* PlDoc Tags */

dl.tags
{ font-size: 90%;
margin-left: 5ex;
margin-top: 1ex;
margin-bottom: 0.5ex;
}

dl.tags dt
{ margin-left: 0pt;
font-weight: bold;
}

dl.tags dd
{ margin-left: 3ex;
}

td.param
{ font-style: italic;
font-weight: bold;
}

/* Index */

dt.index-sep
{ font-weight: bold;
font-size: +1;
margin-top: 1ex;
}

/* Tables */

table.center
{ margin: auto;
}

table.latex
{ border-collapse:collapse;
}

table.latex tr
{ vertical-align: text-top;
}

table.latex td,th
{ padding: 2px 1em;
}

table.latex tr.hline td,th
{ border-top: 1px solid black;
}

table.frame-box
{ border: 2px solid black;
}

</style>
</head>
<body style="background:white">
<div class="navigate"><a class="nav" href="index.html"><img src="home.gif" alt="Home"></a>
<a class="nav" href="Contents.html"><img src="index.gif" alt="Contents"></a>
<a class="nav" href="DocIndex.html"><img src="yellow_pages.gif" alt="Index"></a>
<a class="nav" href="summary.html"><img src="info.gif" alt="Summary"></a>
<a class="nav" href="compilation.html"><img src="prev.gif" alt="Previous"></a>
<a class="nav" href="hooks.html"><img src="next.gif" alt="Next"></a>
</div>
<h2 id="sec:flags"><a id="sec:2.11"><span class="sec-nr">2.11</span> <span class="sec-title">Environment 
Control (Prolog flags)</span></a></h2>

<a id="sec:flags"></a>

<p>The predicates <a id="idx:currentprologflag2:61"></a><a class="pred" href="flags.html#current_prolog_flag/2">current_prolog_flag/2</a> 
and <a id="idx:setprologflag2:62"></a><a class="pred" href="flags.html#set_prolog_flag/2">set_prolog_flag/2</a> 
allow the user to examine and modify the execution environment. It 
provides access to whether optional features are available on this 
version, operating system, foreign code environment, command line 
arguments, version, as well as runtime flags to control the runtime 
behaviour of certain predicates to achieve compatibility with other 
Prolog environments.

<dl class="latex">
<dt class="pubdef"><span class="pred-tag">[ISO]</span><a id="current_prolog_flag/2"><strong>current_prolog_flag</strong>(<var>?Key, 
-Value</var>)</a></dt>
<dd class="defbody">
The predicate <a id="idx:currentprologflag2:63"></a><a class="pred" href="flags.html#current_prolog_flag/2">current_prolog_flag/2</a> 
defines an interface to installation features: options compiled in, 
version, home, etc. With both arguments unbound, it will generate all 
defined Prolog flags. With `Key' instantiated, it unifies the value of 
the Prolog flag. Flag values are typed. Flags marked as <code>bool</code> 
can have the values <code>true</code> or
<code>false</code>. Some Prolog flags are not defined in all versions, 
which is normally indicated in the documentation below as <i>``if 
present and true''</i>. A boolean Prolog flag is true iff the Prolog 
flag is present <b>and</b> the <var>Value</var> is the atom <code>true</code>. 
Tests for such flags should be written as below:

<pre class="code">
        (   current_prolog_flag(windows, true)
        -&gt;  &lt;Do MS-Windows things&gt;
        ;   &lt;Do normal things&gt;
        )
</pre>

<p>Some Prolog flags are scoped to a source file. This implies that if 
they are set using a directive inside a file, the flag value encountered 
when loading of the file started is restored when loading of the file is 
completed. Currently, the following flags are scoped to the source file:
<a class="flag" href="flags.html#flag:generate_debug_info">generate_debug_info</a> 
and <a class="flag" href="flags.html#flag:optimise">optimise</a>.

<p>A new thread (see <a class="sec" href="threads.html">section 8</a>) <em>copies</em> 
all flags from the thread that created the new thread (its <em>parent</em>).<sup class="fn">13<span class="fn-text">This 
is implemented using the copy-on-write tecnhnique.</span></sup> As a 
consequence, modifying a flag inside a thread does not affect other 
threads.

<dl class="latex">
<dt class="pubdef"><a id="flag:access_level"><strong>access_level</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
This flag defines a normal `user' view (<code>user</code>, default) or a 
`system' view. In system view all system code is fully accessible as if 
it was normal user code. In user view, certain operations are not 
permitted and some details are kept invisible. We leave the exact 
consequences undefined, but, for example, system code can be traced 
using system access and system predicates can be redefined.</dd>
<dt class="pubdef"><a id="flag:address_bits"><strong>address_bits</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
Address size of the hosting machine. Typically 32 or 64. Except for the 
maximum stack limit, this has few implications to the user. See also the 
Prolog flag <a class="flag" href="flags.html#flag:arch">arch</a>.</dd>
<dt class="pubdef"><a id="flag:agc_margin"><strong>agc_margin</strong>(<var>integer</var>, changeable)</a></dt>
<dd class="defbody">
If this amount of atoms possible garbage atoms exist perform atom 
garbage collection at the first opportunity. Initial value is 10,000. 
May be changed. A value of 0 (zero) disables atom garbage collection. 
See also <a class="func" href="foreigninclude.html#PL_register_atom()">PL_register_atom()</a>.<sup class="fn">14<span class="fn-text">Given 
that SWI-Prolog has no limit on the length of atoms, 10,000 atoms may 
still occupy a lot of memory. Applications using extremely large atoms 
may wish to call <a id="idx:garbagecollectatoms0:64"></a><a class="pred" href="memory.html#garbage_collect_atoms/0">garbage_collect_atoms/0</a> 
explicitly or lower the margin.</span></sup></dd>
<dt class="pubdef"><a id="flag:apple"><strong>apple</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
<a id="idx:MacOS:65"></a>If present and <code>true</code>, the operating 
system is MacOSX. Defined if the C compiler used to compile this version 
of SWI-Prolog defines
<code>__APPLE__</code>. Note that the <a class="flag" href="flags.html#flag:unix">unix</a> 
is also defined for MacOSX.</dd>
<dt class="pubdef"><a id="flag:allow_variable_name_as_functor"><strong>allow_variable_name_as_functor</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If true (default is false), <code>Functor(arg)</code> is read as if it 
were written <code>'Functor'(arg)</code>. Some applications use the 
Prolog <a id="idx:read1:66"></a><a class="pred" href="termrw.html#read/1">read/1</a> 
predicate for reading an application-defined script language. In these 
cases, it is often difficult to explain to non-Prolog users of the 
application that constants and functions can only start with a lowercase 
letter. Variables can be turned into atoms starting with an uppercase 
atom by calling <a id="idx:readterm2:67"></a><a class="pred" href="termrw.html#read_term/2">read_term/2</a> 
using the option <code>variable_names</code> and binding the variables 
to their name. Using this feature, F(x) can be turned into valid syntax 
for such script languages. Suggested by Robert van Engelen. SWI-Prolog 
specific.</dd>
<dt class="pubdef"><a id="flag:argv"><strong>argv</strong>(<var>list</var>, changeable)</a></dt>
<dd class="defbody">
List is a list of atoms representing the application command line 
arguments. Application command line arguments are those that have
<em>not</em> been processed by Prolog during its initialization. Note 
that Prolog's argument processing stops at <code>--</code> or the first 
non-option argument. See also <a class="flag" href="flags.html#flag:os_argv">os_argv</a>.<sup class="fn">15<span class="fn-text">Prior 
to version 6.5.2, <a class="flag" href="flags.html#flag:argv">argv</a> 
was defined as <a class="flag" href="flags.html#flag:os_argv">os_argv</a> 
is now. The change was made for compatibility reasone and because the 
current definition is more practical.</span></sup></dd>
<dt class="pubdef"><a id="flag:arch"><strong>arch</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Identifier for the hardware and operating system SWI-Prolog is running 
on. Used to select foreign files for the right architecture. See also
<a class="sec" href="foreignlink.html">section 9.2.3</a> and <a id="idx:filesearchpath2:68"></a><a class="pred" href="consulting.html#file_search_path/2">file_search_path/2</a>.</dd>
<dt class="pubdef"><a id="flag:associated_file"><strong>associated_file</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Set if Prolog was started with a prolog file as argument. Used by e.g., <a id="idx:edit0:69"></a><a class="pred" href="edit.html#edit/0">edit/0</a> 
to edit the initial file.</dd>
<dt class="pubdef"><a id="flag:autoload"><strong>autoload</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default) autoloading of library functions is 
enabled.</dd>
<dt class="pubdef"><a id="flag:backquoted_string"><strong>backquoted_string</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default <code>false</code>), read translates text 
between backquotes into a string object (see <a class="sec" href="strings.html">section 
4.24</a>). This flag is mainly for compatibility with LPA Prolog.</dd>
<dt class="pubdef"><a id="flag:bounded"><strong>bounded</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
ISO Prolog flag. If <code>true</code>, integer representation is bound 
by
<a class="flag" href="flags.html#flag:min_integer">min_integer</a> and <a class="flag" href="flags.html#flag:max_integer">max_integer</a>. 
If <code>false</code> integers can be arbitrarily large and the <a class="flag" href="flags.html#flag:min_integer">min_integer</a> 
and
<a class="flag" href="flags.html#flag:max_integer">max_integer</a> are 
not present. See <a class="sec" href="arith.html">section 4.27.2.1</a>.</dd>
<dt class="pubdef"><a id="flag:break_level"><strong>break_level</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
Current break-level. The initial top level (started with
<strong>-t</strong>) has value 0. See <a id="idx:break0:70"></a><a class="pred" href="toplevel.html#break/0">break/0</a>. 
This flag is absent from threads that are not running a top-level loop.</dd>
<dt class="pubdef"><a id="flag:c_cc"><strong>c_cc</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Name of the C compiler used to compile SWI-Prolog. Normally either gcc 
or cc. See <a class="sec" href="plld.html">section 9.5</a>.</dd>
<dt class="pubdef"><a id="flag:c_cflags"><strong>c_cflags</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
CFLAGS used to compile SWI-Prolog. See <a class="sec" href="plld.html">section 
9.5</a>.</dd>
<dt class="pubdef"><a id="flag:c_ldflags"><strong>c_ldflags</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
LDFLAGS used to link SWI-Prolog. See <a class="sec" href="plld.html">section 
9.5</a>.</dd>
<dt class="pubdef"><a id="flag:c_libs"><strong>c_libs</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Libraries needed to link executables that embed SWI-Prolog. Typically
<code>-lswipl</code> if the SWI-Prolog kernel is a shared (DLL). If the 
SWI-Prolog kernel is in a static library, this flag also contains the 
dependencies.</dd>
<dt class="pubdef"><a id="flag:c_libplso"><strong>c_libplso</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Libraries needed to link extensions (shared object, DLL) to SWI-Prolog. 
Typically empty on ELF systems and <code>-lswipl</code> on COFF-based 
systems. See <a class="sec" href="plld.html">section 9.5</a>.</dd>
<dt class="pubdef"><a id="flag:char_conversion"><strong>char_conversion</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
Determines whether character conversion takes place while reading terms. 
See also <a id="idx:charconversion2:71"></a><a class="pred" href="charconv.html#char_conversion/2">char_conversion/2</a>.</dd>
<dt class="pubdef"><a id="flag:character_escapes"><strong>character_escapes</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default), <a id="idx:read1:72"></a><a class="pred" href="termrw.html#read/1">read/1</a> 
interprets <code>\</code> escape sequences in quoted atoms and strings. 
May be changed. This flag is local to the module in which it is changed.</dd>
<dt class="pubdef"><a id="flag:colon_sets_calling_context"><strong>colon_sets_calling_context</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
Using the construct &lt;<var>module</var>&gt;:&lt;<var>goal</var>&gt; 
sets the <em>calling context</em> for executing &lt;<var>goal</var>&gt;. 
This flag is defined by ISO/IEC 13211-2 (Prolog modules standard). See <a class="sec" href="modules.html">section 
5</a>.</dd>
<dt class="pubdef"><a id="flag:color_term"><strong>color_term</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
This flag is managed by library <code>library(ansi_term)</code>, which 
is loaded at startup if the two conditions below are both true. Note 
that this implies that setting this flag to <code>false</code> from the 
system or personal initialization file (see <a class="sec" href="initfile.html">section 
2.2</a> disables colored output. The predicate <a id="idx:messageproperty2:73"></a><a class="pred" href="exception.html#message_property/2">message_property/2</a> 
can be used to control the actual color scheme depending in the message 
type passed to
<a id="idx:printmessage2:74"></a><a class="pred" href="exception.html#print_message/2">print_message/2</a>.

<p>
<ul class="latex">
<li><code>stream_property(current_output, tty(true))</code>
<li><code>\+ current_prolog_flag(color_term, false)</code>
</ul>
</dd>
<dt class="pubdef"><a id="flag:compile_meta_arguments"><strong>compile_meta_arguments</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Experimental flag that controls compilation of arguments passed to 
meta-calls marked `0' or `<code><code>^</code></code>' (see <a id="idx:metapredicate1:75"></a><a class="pred" href="metapred.html#meta_predicate/1">meta_predicate/1</a>). 
Supported values are:

<dl class="latex">
<dt><strong>false</strong></dt>
<dd class="defbody">
(default). Meta-arguments are passed verbatim.
</dd>
<dt><strong>control</strong></dt>
<dd class="defbody">
Compile meta-arguments that contain control structures ((A,B), (A;B), 
(A-&gt;B;C), etc.). If not compiled at compile time, such arguments are 
compiled to a temporary clause before execution. Using this option 
enhances performance of processing complex meta-goals that are known at 
compile time.
</dd>
<dt><strong>true</strong></dt>
<dd class="defbody">
Also compile references to normal user predicates. This harms 
performance (a little), but enhances the power of poor-mens consistency 
check used by <a id="idx:make0:76"></a><a class="pred" href="consulting.html#make/0">make/0</a> 
and implemented by <a id="idx:listundefined0:77"></a><a class="pred" href="check.html#list_undefined/0">list_undefined/0</a>.
</dd>
<dt><strong>always</strong></dt>
<dd class="defbody">
Always create an intermediate clause, even for system predicates. This 
prepares for replacing the normal head of the generated predicate with a 
special reference (similar to database references as used by, e.g.,
<a id="idx:assert2:78"></a><a class="pred" href="db.html#assert/2">assert/2</a>) 
that provides direct access to the executable code, thus avoiding 
runtime lookup of predicates for meta-calling.
</dd>
</dl>

</dd>
<dt class="pubdef"><a id="flag:compiled_at"><strong>compiled_at</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Describes when the system has been compiled. Only available if the C 
compiler used to compile SWI-Prolog provides the __DATE__ and __TIME__ 
macros.</dd>
<dt class="pubdef"><a id="flag:console_menu"><strong>console_menu</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
Set to <code>true</code> in <b>swipl-win.exe</b> to indicate that the 
console supports menus. See also <a class="sec" href="system.html">section 
4.34.3</a>.</dd>
<dt class="pubdef"><a id="flag:cpu_count"><strong>cpu_count</strong>(<var>integer</var>, changeable)</a></dt>
<dd class="defbody">
Number of physical CPUs or cores in the system. The flag is marked 
read-write both to allow pretending the system has more or less 
processors. See also <a id="idx:threadsetconcurrency2:79"></a><a class="pred" href="threadcreate.html#thread_setconcurrency/2">thread_setconcurrency/2</a> 
and the library
<code>library(thread)</code>. This flag is not available on systems 
where we do not know how to get the number of CPUs. This flag is not 
included in a saved state (see <a id="idx:qsaveprogram1:80"></a><a class="pred" href="runtime.html#qsave_program/1">qsave_program/1</a>).</dd>
<dt class="pubdef"><a id="flag:dde"><strong>dde</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
Set to <code>true</code> if this instance of Prolog supports DDE as 
described in <a class="sec" href="DDE.html">section 4.42</a>.</dd>
<dt class="pubdef"><a id="flag:debug"><strong>debug</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
Switch debugging mode on/off. If debug mode is activated the system 
traps encountered spy points (see <a id="idx:spy1:81"></a><a class="pred" href="debugger.html#spy/1">spy/1</a>) 
and trace points (see <a id="idx:trace1:82"></a><a class="pred" href="debugger.html#trace/1">trace/1</a>). 
In addition, last-call optimisation is disabled and the system is more 
conservative in destroying choice points to simplify debugging.

<p>Disabling these optimisations can cause the system to run out of 
memory on programs that behave correctly if debug mode is off.</dd>
<dt class="pubdef"><a id="flag:debug_on_error"><strong>debug_on_error</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code>, start the tracer after an error is detected. 
Otherwise just continue execution. The goal that raised the error will 
normally fail. See also <a id="idx:fileerrors2:83"></a><span class="pred-ext">fileerrors/2</span> 
and the Prolog flag <code>report_error</code>. May be changed. Default 
is <code>true</code>, except for the runtime version.</dd>
<dt class="pubdef"><a id="flag:debugger_print_options"><strong>debugger_print_options</strong>(<var>term</var>, changeable)</a></dt>
<dd class="defbody">
This argument is given as option-list to <a id="idx:writeterm2:84"></a><a class="pred" href="termrw.html#write_term/2">write_term/2</a> 
for printing goals by the debugger. Modified by the `w', `p' and `&lt;<var>N</var>&gt; 
d' commands of the debugger. Default is <code>[quoted(true), 
portray(true), max_depth(10), attributes(portray)]</code>.</dd>
<dt class="pubdef"><a id="flag:debugger_show_context"><strong>debugger_show_context</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code>, show the context module while printing a 
stack-frame in the tracer. Normally controlled using the `C' option of 
the tracer.</dd>
<dt class="pubdef"><a id="flag:dialect"><strong>dialect</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Fixed to <code>swi</code>. The code below is a reliable and portable way 
to detect SWI-Prolog.

<pre class="code">
is_dialect(swi) :-
        catch(current_prolog_flag(dialect, swi), _, fail).
</pre>

</dd>
<dt class="pubdef"><a id="flag:double_quotes"><strong>double_quotes</strong>(<var>codes,chars,atom,string</var>, changeable)</a></dt>
<dd class="defbody">
This flag determines how double quoted strings are read by Prolog and is 
---like <a class="flag" href="flags.html#flag:character_escapes">character_escapes</a>--- 
maintained for each module. If
<code>codes</code> (default), a list of character codes is returned, if
<code>chars</code> a list of one-character atoms, if <code>atom</code> 
double quotes are the same as single quotes and finally, <code>string</code> 
reads the text into a Prolog string (see <a class="sec" href="strings.html">section 
4.24</a>). See also
<a id="idx:atomchars2:85"></a><a class="pred" href="manipatom.html#atom_chars/2">atom_chars/2</a> 
and <a id="idx:atomcodes2:86"></a><a class="pred" href="manipatom.html#atom_codes/2">atom_codes/2</a>.</dd>
<dt class="pubdef"><a id="flag:editor"><strong>editor</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Determines the editor used by <a id="idx:edit1:87"></a><a class="pred" href="edit.html#edit/1">edit/1</a>. 
See <a class="sec" href="listing.html">section 4.5</a> for details on 
selecting the editor used.</dd>
<dt class="pubdef"><a id="flag:emacs_inferior_process"><strong>emacs_inferior_process</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
If true, SWI-Prolog is running as an <em>inferior process</em> of 
(GNU/X-)Emacs. SWI-Prolog assumes this is the case if the environment 
variable <code>EMACS</code> is <code>t</code> and <code>INFERIOR</code> 
is <code>yes</code>.</dd>
<dt class="pubdef"><a id="flag:encoding"><strong>encoding</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Default encoding used for opening files in <code>text</code> mode. The 
initial value is deduced from the environment. See <a class="sec" href="widechars.html">section 
2.18.1</a> for details.</dd>
<dt class="pubdef"><a id="flag:executable"><strong>executable</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Pathname of the running executable. Used by <a id="idx:qsaveprogram2:88"></a><a class="pred" href="runtime.html#qsave_program/2">qsave_program/2</a> 
as default emulator.</dd>
<dt class="pubdef"><a id="flag:exit_status"><strong>exit_status</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
Set by <a id="idx:halt1:89"></a><a class="pred" href="toplevel.html#halt/1">halt/1</a> 
to its argument, making the exit status available to hooks registered 
with <a id="idx:athalt1:90"></a><a class="pred" href="consulting.html#at_halt/1">at_halt/1</a>.</dd>
<dt class="pubdef"><a id="flag:file_name_variables"><strong>file_name_variables</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default <code>false</code>), expand <code>$<var>varname</var></code> 
and <code><code>~</code></code> in arguments of built-in predicates that 
accept a file name (<a id="idx:open3:91"></a><a class="pred" href="IO.html#open/3">open/3</a>, <a id="idx:existsfile1:92"></a><a class="pred" href="files.html#exists_file/1">exists_file/1</a>, <a id="idx:accessfile2:93"></a><a class="pred" href="files.html#access_file/2">access_file/2</a>, 
etc.). The predicate
<a id="idx:expandfilename2:94"></a><a class="pred" href="files.html#expand_file_name/2">expand_file_name/2</a> 
can be used to expand environment variables and wildcard patterns. This 
Prolog flag is intended for backward compatibility with older versions 
of SWI-Prolog.</dd>
<dt class="pubdef"><a id="flag:gc"><strong>gc</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If true (default), the garbage collector is active. If false, neither 
garbage collection, nor stack shifts will take place, even not on 
explicit request. May be changed.</dd>
<dt class="pubdef"><a id="flag:generate_debug_info"><strong>generate_debug_info</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default) generate code that can be debugged using
<a id="idx:trace0:95"></a><a class="pred" href="debugger.html#trace/0">trace/0</a>, <a id="idx:spy1:96"></a><a class="pred" href="debugger.html#spy/1">spy/1</a>, 
etc. Can be set to <code>false</code> using the
<strong>-nodebug</strong>. This flag is scoped within a source file. 
Many of the libraries have
<code>:- set_prolog_flag(generate_debug_info, false)</code> to hide 
their details from a normal trace.<sup class="fn">16<span class="fn-text">In 
the current implementation this only causes a flag to be set on the 
predicate that causes children to be hidden from the debugger. The name 
anticipates further changes to the compiler.</span></sup></dd>
<dt class="pubdef"><a id="flag:gmp_version"><strong>gmp_version</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
If Prolog is linked with GMP, this flag gives the major version of the 
GMP library used. See also <a class="sec" href="foreigninclude.html">section 
9.4.8</a>.</dd>
<dt class="pubdef"><a id="flag:gui"><strong>gui</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
Set to <code>true</code> if XPCE is around and can be used for graphics.</dd>
<dt class="pubdef"><a id="flag:history"><strong>history</strong>(<var>integer</var>, changeable)</a></dt>
<dd class="defbody">
If <var><var>integer</var>&gt; 0</var>, support Unix <b>csh(1)</b>-like 
history as described in <a class="sec" href="history.html">section 2.7</a>. 
Otherwise, only support reusing commands through the command line 
editor. The default is to set this Prolog flag to 0 if a command line 
editor is provided (see Prolog flag <a class="flag" href="flags.html#flag:readline">readline</a>) 
and 15 otherwise.</dd>
<dt class="pubdef"><a id="flag:home"><strong>home</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
SWI-Prolog's notion of the home directory. SWI-Prolog uses its home 
directory to find its startup file as
<code>&lt;<var>home</var>&gt;/boot32.prc</code> (32-bit machines) or
<code>&lt;<var>home</var>&gt;/boot64.prc</code> (64-bit machines) and to 
find its library as
<code>&lt;<var>home</var>&gt;/library</code>.</dd>
<dt class="pubdef"><a id="flag:hwnd"><strong>hwnd</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
In <b>swipl-win.exe</b>, this refers to the MS-Windows window handle of 
the console window.</dd>
<dt class="pubdef"><a id="flag:integer_rounding_function"><strong>integer_rounding_function</strong>(<var>down,toward_zero</var>)</a></dt>
<dd class="defbody">
ISO Prolog flag describing rounding by <code>//</code> and <code>rem</code> 
arithmetic functions. Value depends on the C compiler used.</dd>
<dt class="pubdef"><a id="flag:iso"><strong>iso</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
Include some weird ISO compatibility that is incompatible with normal 
SWI-Prolog behaviour. Currently it has the following effect:
<ul class="latex">
<li>The <code><code>/</code>/2</code> (float division) <em>always</em> 
returns a float, even if applied to integers that can be divided.
<li>In the standard order of terms (see <a class="sec" href="compare.html">section 
4.7.1</a>), all floats are before all integers.
<li><a id="idx:atomlength2:97"></a><a class="pred" href="manipatom.html#atom_length/2">atom_length/2</a> 
yields a type error if the first argument is a number.
<li><a id="idx:clause23:98"></a><span class="pred-ext">clause/[2,3]</span> 
raises a permission error when accessing static predicates.
<li><a id="idx:abolish12:99"></a><span class="pred-ext">abolish/[1,2]</span> 
raises a permission error when accessing static predicates.
<li>Syntax is closer to the ISO standard:
<ul class="latex">
<li>Unquoted commas and bars appearing as atoms are not allowed. Instead 
of
<code>f(,,a)</code> now write <code>f(',',a)</code>. Unquoted commas can 
only be used to separate arguments in functional notation and list 
notation, and as a conjunction operator. Unquoted bars can only appear 
within lists to separate head and tail, like <code>[Head|Tail]</code>, 
and as infix operator for alternation in grammar rules, like <code>a --&gt; 
b | c.</code>
<li>Within functional notation and list notation terms must have 
priority below 1000. That means that rules and control constructs 
appearing as arguments need bracketing. A term like <code>[a :- b, c].</code> 
must now be disambiguated to mean <code>[(a :- b), c].</code> or <code>[(a 
:- b, c)].</code>
<li>Operators appearing as operands must be bracketed. Instead of <code>X 
== -, true.</code> write <code>X == (-), true.</code> Currently, this is 
not entirely enforced.
<li>Backslash-escaped newlines are interpreted according to the ISO 
standard. See <a class="sec" href="syntax.html">section 2.15.1.2</a>.
</ul>
</ul>
</dd>
<dt class="pubdef"><a id="flag:large_files"><strong>large_files</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
If present and <code>true</code>, SWI-Prolog has been compiled with
<em>large file support</em> (LFS) and is capable of accessing files 
larger than 2GB on 32-bit hardware. Large file support is default on 
installations built using <b>configure</b> that support it and may be 
switched off using the configure option <code>--disable-largefile</code>.</dd>
<dt class="pubdef"><a id="flag:last_call_optimisation"><strong>last_call_optimisation</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
Determines whether or not last-call optimisation is enabled. Normally 
the value of this flag is the negation of the <a class="flag" href="flags.html#flag:debug">debug</a> 
flag. As programs may run out of stack if last-call optimisation is 
omitted, it is sometimes necessary to enable it during debugging.</dd>
<dt class="pubdef"><a id="flag:max_arity"><strong>max_arity</strong>(<var>unbounded</var>)</a></dt>
<dd class="defbody">
ISO Prolog flag describing there is no maximum arity to compound terms.</dd>
<dt class="pubdef"><a id="flag:max_integer"><strong>max_integer</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
Maximum integer value if integers are <em>bounded</em>. See also the 
flag <a class="flag" href="flags.html#flag:bounded">bounded</a> and <a class="sec" href="arith.html">section 
4.27.2.1</a>.</dd>
<dt class="pubdef"><a id="flag:max_tagged_integer"><strong>max_tagged_integer</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
Maximum integer value represented as a `tagged' value. Tagged integers 
require one word storage. Larger integers are represented as `indirect 
data' and require significantly more space.</dd>
<dt class="pubdef"><a id="flag:min_integer"><strong>min_integer</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
Minimum integer value if integers are <em>bounded</em>. See also the 
flag <a class="flag" href="flags.html#flag:bounded">bounded</a> and <a class="sec" href="arith.html">section 
4.27.2.1</a>.</dd>
<dt class="pubdef"><a id="flag:min_tagged_integer"><strong>min_tagged_integer</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
Start of the tagged-integer value range.</dd>
<dt class="pubdef"><a id="flag:occurs_check"><strong>occurs_check</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
This flag controls unification that creates an infinite tree (also 
called <em>cyclic term</em>) and can have three values. Using
<code>false</code> (default), unification succeeds, creating an infinite 
tree. Using <code>true</code>, unification behaves as <a id="idx:unifywithoccurscheck2:100"></a><a class="pred" href="compare.html#unify_with_occurs_check/2">unify_with_occurs_check/2</a>, 
failing silently. Using <code>error</code>, an attempt to create a 
cyclic term results in an <code>occurs_check</code> exception. The 
latter is intended for debugging unintentional creations of cyclic 
terms. Note that this flag is a global flag modifying fundamental 
behaviour of Prolog. Changing the flag from its default may cause 
libraries to stop functioning properly.</dd>
<dt class="pubdef"><a id="flag:open_shared_object"><strong>open_shared_object</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
If true, <a id="idx:opensharedobject2:101"></a><a class="pred" href="foreignlink.html#open_shared_object/2">open_shared_object/2</a> 
and friends are implemented, providing access to shared libraries (<code>.so</code> 
files) or dynamic link libraries (<code>.DLL</code> files).</dd>
<dt class="pubdef"><a id="flag:optimise"><strong>optimise</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code>, compile in optimised mode. The initial value is
<code>true</code> if Prolog was started with the <strong>-O</strong> 
command line option. The <a class="flag" href="flags.html#flag:optimise">optimise</a> 
flag is scoped to a source file.

<p>Currently optimised compilation implies compilation of arithmetic, 
and deletion of redundant <a id="idx:true0:102"></a><a class="pred" href="control.html#true/0">true/0</a> 
that may result from <a id="idx:expandgoal2:103"></a><a class="pred" href="consulting.html#expand_goal/2">expand_goal/2</a>.

<p>Later versions might imply various other optimisations such as 
integrating small predicates into their callers, eliminating constant 
expressions and other predictable constructs. Source code optimisation 
is never applied to predicates that are declared dynamic (see
<a id="idx:dynamic1:104"></a><a class="pred" href="dynamic.html#dynamic/1">dynamic/1</a>).</dd>
<dt class="pubdef"><a id="flag:os_argv"><strong>os_argv</strong>(<var>list</var>, changeable)</a></dt>
<dd class="defbody">
List is a list of atoms representing the command line arguments used to 
invoke SWI-Prolog. Please note that <b>all</b> arguments are included in 
the list returned. See <a class="flag" href="flags.html#flag:argv">argv</a> 
to get the application options.</dd>
<dt class="pubdef"><a id="flag:pid"><strong>pid</strong>(<var>int</var>)</a></dt>
<dd class="defbody">
Process identifier of the running Prolog process. Existence of this flag 
is implementation-defined.</dd>
<dt class="pubdef"><a id="flag:pipe"><strong>pipe</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If true, <code>open(pipe(command), mode, Stream)</code>, etc. are 
supported. Can be changed to disable the use of pipes in applications 
testing this feature. Not recommended.</dd>
<dt class="pubdef"><a id="flag:prompt_alternatives_on"><strong>prompt_alternatives_on</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
<a id="idx:promptalternatives:105"></a>Determines prompting for 
alternatives in the Prolog top level. Default is
<code>determinism</code>, which implies the system prompts for 
alternatives if the goal succeeded while leaving choice points. Many 
classical Prolog systems behave as <code>groundness</code>: they prompt 
for alternatives if and only if the query contains variables.</dd>
<dt class="pubdef"><a id="flag:qcompile"><strong>qcompile</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
This option provides the default for the <code>qcompile(+Atom)</code> 
option of <a id="idx:loadfiles2:106"></a><a class="pred" href="consulting.html#load_files/2">load_files/2</a>.</dd>
<dt class="pubdef"><a id="flag:readline"><strong>readline</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
If true, SWI-Prolog is linked with the readline library. This is done by 
default if you have this library installed on your system. It is also 
true for the Win32 swipl-win.exe version of SWI-Prolog, which realises a 
subset of the readline functionality.</dd>
<dt class="pubdef"><a id="flag:resource_database"><strong>resource_database</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Set to the absolute filename of the attached state. Typically this is 
the file <code>boot32.prc</code>, the file specified with <strong>-x</strong> 
or the running executable. See also <a id="idx:resource3:107"></a><a class="pred" href="useresource.html#resource/3">resource/3</a>.</dd>
<dt class="pubdef"><a id="flag:report_error"><strong>report_error</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code>, print error messages; otherwise suppress them. May 
be changed. See also the <a class="flag" href="flags.html#flag:debug_on_error">debug_on_error</a> 
Prolog flag. Default is <code>true</code>, except for the runtime 
version.</dd>
<dt class="pubdef"><a id="flag:runtime"><strong>runtime</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
If present and <code>true</code>, SWI-Prolog is compiled with 
-DO_RUNTIME, disabling various useful development features (currently 
the tracer and profiler).</dd>
<dt class="pubdef"><a id="flag:sandboxed_load"><strong>sandboxed_load</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default <code>false</code>), <a id="idx:loadfiles2:108"></a><a class="pred" href="consulting.html#load_files/2">load_files/2</a> 
calls hooks to allow library(sandbox) to verify the safety of 
directives.</dd>
<dt class="pubdef"><a id="flag:saved_program"><strong>saved_program</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
If present and <code>true</code>, Prolog has been started from a state 
saved with <a id="idx:qsaveprogram12:109"></a><span class="pred-ext">qsave_program/[1,2]</span>.</dd>
<dt class="pubdef"><a id="flag:shared_object_extension"><strong>shared_object_extension</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Extension used by the operating system for shared objects. <code>.so</code> 
for most Unix systems and <code>.dll</code> for Windows. Used for 
locating files using the <code>file_type</code> <code>executable</code>. 
See also
<a id="idx:absolutefilename3:110"></a><a class="pred" href="files.html#absolute_file_name/3">absolute_file_name/3</a>.</dd>
<dt class="pubdef"><a id="flag:shared_object_search_path"><strong>shared_object_search_path</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Name of the environment variable used by the system to search for shared 
objects.</dd>
<dt class="pubdef"><a id="flag:signals"><strong>signals</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
Determine whether Prolog is handling signals (software interrupts). This 
flag is <code>false</code> if the hosting OS does not support signal 
handling or the command line option <strong>-nosignals</strong> is 
active. See
<a class="sec" href="foreigninclude.html">section 9.4.21.1</a> for 
details.</dd>
<dt class="pubdef"><a id="flag:stream_type_check"><strong>stream_type_check</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Defines whether and how strictly the system validates that byte I/O 
should not be applied to text streams and text I/O should not be applied 
to binary streams. Values are <code>false</code> (no checking), <code>true</code> 
(full checking) and <code>loose</code>. Using checking mode <code>loose</code> 
(default), the system accepts byte I/O from text stream that use ISO 
Latin-1 encoding and accepts writing text to binary streams.</dd>
<dt class="pubdef"><a id="flag:system_thread_id"><strong>system_thread_id</strong>(<var>int</var>)</a></dt>
<dd class="defbody">
Available in multithreaded version (see <a class="sec" href="threads.html">section 
8</a>) where the operating system provides system-wide integer thread 
identifiers. The integer is the thread identifier used by the operating 
system for the calling thread. See also <a id="idx:threadself1:111"></a><a class="pred" href="threadcreate.html#thread_self/1">thread_self/1</a>.</dd>
<dt class="pubdef"><a id="flag:timezone"><strong>timezone</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
Offset in seconds west of GMT of the current time zone. Set at 
initialization time from the <code>timezone</code> variable associated 
with the POSIX tzset() function. See also <a id="idx:converttime2:112"></a><span class="pred-ext">convert_time/2</span>.</dd>
<dt class="pubdef"><a id="flag:toplevel_print_anon"><strong>toplevel_print_anon</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code>, top-level variables starting with an underscore (<code>_</code>) 
are printed normally. If <code>false</code> they are hidden. This may be 
used to hide bindings in complex queries from the top level.</dd>
<dt class="pubdef"><a id="flag:toplevel_print_factorized"><strong>toplevel_print_factorized</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default <code>false</code>) show the internal 
sharing of subterms in the answer substitution. The example below 
reveals internal sharing of leaf nodes in <em>red-black trees</em> as 
implemented by the
<code>library(rbtrees)</code> predicate <a id="idx:rbnew1:113"></a><span class="pred-ext">rb_new/1</span>:

<pre class="code">
?- set_prolog_flag(toplevel_print_factorized, true).
?- rb_new(X).
X = t(_S1, _S1), % where
    _S1 = black('', _G387, _G388, '').
</pre>

<p>If this flag is <code>false</code>, the <code>% where</code> notation 
is still used to indicate cycles as illustrated below. This example also 
shows that the implementation reveals the internal cycle length, and <em>not</em> 
the minimal cycle length. Cycles of different length are 
indistinguishable in Prolog (as illustrated by <code>S == R</code>).

<pre class="code">
?- S = s(S), R = s(s(R)), S == R.
S = s(S),
R = s(s(R)).
</pre>

</dd>
<dt class="pubdef"><a id="flag:toplevel_print_options"><strong>toplevel_print_options</strong>(<var>term</var>, changeable)</a></dt>
<dd class="defbody">
This argument is given as option-list to <a id="idx:writeterm2:114"></a><a class="pred" href="termrw.html#write_term/2">write_term/2</a> 
for printing results of queries. Default is <code>[quoted(true), 
portray(true), max_depth(10), attributes(portray)]</code>.</dd>
<dt class="pubdef"><a id="flag:toplevel_prompt"><strong>toplevel_prompt</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Define the prompt that is used by the interactive top level. The 
following <code>~</code> (tilde) sequences are replaced:

<p><table class="latex frame-hsides center">
<tr><td><code><code>~</code></code>m</td><td><em>Type in</em> module if 
not <code>user</code> (see <a id="idx:module1:115"></a><a class="pred" href="mtoplevel.html#module/1">module/1</a>) </td></tr>
<tr><td><code><code>~</code></code>l</td><td><em>Break level</em> if not 
0 (see <a id="idx:break0:116"></a><a class="pred" href="toplevel.html#break/0">break/0</a>) </td></tr>
<tr><td><code><code>~</code></code>d</td><td><em>Debugging state</em> if 
not normal execution (see <a id="idx:debug0:117"></a><a class="pred" href="debugger.html#debug/0">debug/0</a>, <a id="idx:trace0:118"></a><a class="pred" href="debugger.html#trace/0">trace/0</a>) </td></tr>
<tr><td><code><code>~</code></code>!</td><td><em>History event</em> if 
history is enabled (see flag <a class="flag" href="flags.html#flag:history">history</a>) </td></tr>
</table>
</dd>
<dt class="pubdef"><a id="flag:toplevel_var_size"><strong>toplevel_var_size</strong>(<var>int</var>, changeable)</a></dt>
<dd class="defbody">
Maximum size counted in literals of a term returned as a binding for a 
variable in a top-level query that is saved for re-use using the
<code><code>$</code></code> variable reference. See <a class="sec" href="topvars.html">section 
2.8</a>.</dd>
<dt class="pubdef"><a id="flag:trace_gc"><strong>trace_gc</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default <code>false</code>), garbage collections 
and stack-shifts will be reported on the terminal. May be changed. 
Values are reported in bytes as <var>G</var>+<var>T</var>, where <var>G</var> 
is the global stack value and <var>T</var> the trail stack value. 
`Gained' describes the number of bytes reclaimed. `used' the number of 
bytes on the stack after GC and `free' the number of bytes allocated, 
but not in use. Below is an example output.

<pre class="code">
% GC: gained 236,416+163,424 in 0.00 sec;
      used 13,448+5,808; free 72,568+47,440
</pre>

</dd>
<dt class="pubdef"><a id="flag:tty_control"><strong>tty_control</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
Determines whether the terminal is switched to raw mode for
<a id="idx:getsinglechar1:119"></a><a class="pred" href="chario.html#get_single_char/1">get_single_char/1</a>, 
which also reads the user actions for the trace. May be set. See also 
the <strong>+/-tty</strong> command line option.</dd>
<dt class="pubdef"><a id="flag:unix"><strong>unix</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
<a id="idx:unix:120"></a>If present and <code>true</code>, the operating 
system is some version of Unix. Defined if the C compiler used to 
compile this version of SWI-Prolog either defines <code>__unix__</code> 
or <code>unix</code>. On other systems this flag is not available. See 
also <a class="flag" href="flags.html#flag:apple">apple</a> and <a class="flag" href="flags.html#flag:windows">windows</a>.</dd>
<dt class="pubdef"><a id="flag:unknown"><strong>unknown</strong>(<var>fail,warning,error</var>, changeable)</a></dt>
<dd class="defbody">
Determines the behaviour if an undefined procedure is encountered. If
<code>fail</code>, the predicate fails silently. If <code>warn</code>, a 
warning is printed, and execution continues as if the predicate was not 
defined, and if <code>error</code> (default), an <code>existence_error</code> 
exception is raised. This flag is local to each module and inherited 
from the module's <em>import-module</em>. Using default setup, this 
implies that normal modules inherit the flag from <code>user</code>, 
which in turn inherit the value <code>error</code> from <code>system</code>. 
The user may change the flag for module <code>user</code> to change the 
default for all application modules or for a specific module. It is 
strongly advised to keep the <code>error</code> default and use <a id="idx:dynamic1:121"></a><a class="pred" href="dynamic.html#dynamic/1">dynamic/1</a> 
and/or <a id="idx:multifile1:122"></a><a class="pred" href="dynamic.html#multifile/1">multifile/1</a> 
to specify possible non-existence of a predicate.</dd>
<dt class="pubdef"><a id="flag:user_flags"><strong>user_flags</strong>(<var>Atom</var>, changeable)</a></dt>
<dd class="defbody">
Define the behaviour of <a id="idx:setprologflag2:123"></a><a class="pred" href="flags.html#set_prolog_flag/2">set_prolog_flag/2</a> 
if the flag is not known. Values are <code>silent</code>, <code>warning</code> 
and <code>error</code>. The first two create the flag on-the-fly, where <code>warning</code> 
prints a message. The value <code>error</code> is consistent with ISO: 
it raises an existence error and does not create the flag. See also <a id="idx:createprologflag3:124"></a><a class="pred" href="flags.html#create_prolog_flag/3">create_prolog_flag/3</a>. 
The default is <code>silent</code>, but future versions may change that. 
Developers are encouraged to use another value and ensure proper use of <a id="idx:createprologflag3:125"></a><a class="pred" href="flags.html#create_prolog_flag/3">create_prolog_flag/3</a> 
to create flags for their library.</dd>
<dt class="pubdef"><a id="flag:verbose"><strong>verbose</strong>(<var>Atom</var>, changeable)</a></dt>
<dd class="defbody">
This flag is used by <a id="idx:printmessage2:126"></a><a class="pred" href="exception.html#print_message/2">print_message/2</a>. 
If its value is <code>silent</code>, messages of type <code>informational</code> 
and <code>banner</code> are suppressed. The <strong>-q</strong> switches 
the value from the initial
<code>normal</code> to <code>silent</code>.</dd>
<dt class="pubdef"><a id="flag:verbose_autoload"><strong>verbose_autoload</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> the normal consult message will be printed if a 
library is autoloaded. By default this message is suppressed. Intended 
to be used for debugging purposes.</dd>
<dt class="pubdef"><a id="flag:verbose_load"><strong>verbose_load</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Determines messages printed for loading (compiling) Prolog files. 
Current values are <code>full</code>, <code>normal</code> (default) and
<code>silent</code>. The value of this flag is normally controlled by 
the option <code>silent(Bool)</code> provided by <a id="idx:loadfiles2:127"></a><a class="pred" href="consulting.html#load_files/2">load_files/2</a>.</dd>
<dt class="pubdef"><a id="flag:verbose_file_search"><strong>verbose_file_search</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default <code>false</code>), print messages 
indicating the progress of <a id="idx:absolutefilename23:128"></a><span class="pred-ext">absolute_file_name/[2,3]</span> 
in locating files. Intended for debugging complicated file-search paths. 
See also <a id="idx:filesearchpath2:129"></a><a class="pred" href="consulting.html#file_search_path/2">file_search_path/2</a>.</dd>
<dt class="pubdef"><a id="flag:version"><strong>version</strong>(<var>integer</var>)</a></dt>
<dd class="defbody">
The version identifier is an integer with value: 
<blockquote><var>10000 &times; <var>Major</var> + 100 &times; <var>Minor</var> 
+ <var>Patch</var></var></blockquote>
Note that in releases up to 2.7.10 this Prolog flag yielded an atom 
holding the three numbers separated by dots. The current representation 
is much easier for implementing version-conditional statements.</dd>
<dt class="pubdef"><a id="flag:version_data"><strong>version_data</strong>(<var>swi(Major, Minor, Patch, Extra)</var>)</a></dt>
<dd class="defbody">
Part of the dialect compatibility layer; see also the Prolog flag
<a class="flag" href="flags.html#flag:dialect">dialect</a> and <a class="sec" href="dialect.html">section 
C</a>. <var>Extra</var> provides platform-specific version information. 
Currently it is simply unified to <code>[]</code>.</dd>
<dt class="pubdef"><a id="flag:version_git"><strong>version_git</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Available if created from a git repository. See <b>git-describe</b> for 
details.</dd>
<dt class="pubdef"><a id="flag:warn_override_implicit_import"><strong>warn_override_implicit_import</strong>(<var>bool</var>, changeable)</a></dt>
<dd class="defbody">
If <code>true</code> (default), a warning is printed if an implicitly 
imported predicate is clobbered by a local definition. See
<a id="idx:usemodule1:130"></a><a class="pred" href="import.html#use_module/1">use_module/1</a> 
for details.</dd>
<dt class="pubdef"><a id="flag:windows"><strong>windows</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
<a id="idx:windows:131"></a>If present and <code>true</code>, the 
operating system is an implementation of Microsoft Windows (NT/2000/XP, 
etc.). This flag is only available on MS-Windows based versions.</dd>
<dt class="pubdef"><a id="flag:write_attributes"><strong>write_attributes</strong>(<var>atom</var>, changeable)</a></dt>
<dd class="defbody">
Defines how <a id="idx:write1:132"></a><a class="pred" href="termrw.html#write/1">write/1</a> 
and friends write attributed variables. The option values are described 
with the <code>attributes</code> option of
<a id="idx:writeterm3:133"></a><a class="pred" href="termrw.html#write_term/3">write_term/3</a>. 
Default is <code>ignore</code>.</dd>
<dt class="pubdef"><a id="flag:write_help_with_overstrike"><strong>write_help_with_overstrike</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
Internal flag used by <a id="idx:help1:134"></a><a class="pred" href="help.html#help/1">help/1</a> 
when writing to a terminal. If present and <code>true</code> it prints 
bold and underlined text using
<em>overstrike</em>.</dd>
<dt class="pubdef"><a id="flag:xpce"><strong>xpce</strong>(<var>bool</var>)</a></dt>
<dd class="defbody">
Available and set to <code>true</code> if the XPCE graphics system is 
loaded.</dd>
<dt class="pubdef"><a id="flag:xpce_version"><strong>xpce_version</strong>(<var>atom</var>)</a></dt>
<dd class="defbody">
Available and set to the version of the loaded XPCE system.
</dd>
</dl>

</dd>
<dt class="pubdef"><span class="pred-tag">[ISO]</span><a id="set_prolog_flag/2"><strong>set_prolog_flag</strong>(<var>:Key, 
+Value</var>)</a></dt>
<dd class="defbody">
Define a new Prolog flag or change its value. <var>Key</var> is an atom. 
If the flag is a system-defined flag that is not marked
<em>changeable</em> above, an attempt to modify the flag yields a
<code>permission_error</code>. If the provided <var>Value</var> does not 
match the type of the flag, a <code>type_error</code> is raised.

<p>Some flags (e.g., <a class="flag" href="flags.html#flag:unknown">unknown</a>) 
are maintained on a per-module basis. The addressed module is determined 
by the <var>Key</var> argument.

<p>In addition to ISO, SWI-Prolog allows for user-defined Prolog flags. 
The type of the flag is determined from the initial value and cannot be 
changed afterwards. Defined types are <code>boolean</code> (if the 
initial value is one of <code>false</code>, <code>true</code>, <code>on</code> 
or <code>off</code>),
<code>atom</code> if the initial value is any other atom, <code>integer</code> 
if the value is an integer that can be expressed as a 64-bit signed 
value. Any other initial value results in an untyped flag that can 
represent any valid Prolog term.

<p>The behaviour when <var>Key</var> denotes a non-existent key depends 
on the Prolog flag <a class="flag" href="flags.html#flag:user_flags">user_flags</a>. 
The default is to define them silently. New code is encouraged to use <a id="idx:createprologflag3:135"></a><a class="pred" href="flags.html#create_prolog_flag/3">create_prolog_flag/3</a> 
for portability.</dd>
<dt class="pubdef"><span class="pred-tag">[YAP]</span><a id="create_prolog_flag/3"><strong>create_prolog_flag</strong>(<var>+Key, 
+Value, +Options</var>)</a></dt>
<dd class="defbody">
Create a new Prolog flag. The ISO standard does not foresee creation of 
new flags, but many libraries introduce new flags. <var>Options</var> is 
a list of the following options:

<dl class="latex">
<dt><strong>access</strong>(<var>+Access</var>)</dt>
<dd class="defbody">
Define access rights for the flag. Values are <code>read_write</code> 
and <code>read_only</code>. The default is <code>read_write</code>.</dd>
<dt><strong>type</strong>(<var>+Atom</var>)</dt>
<dd class="defbody">
Define a type restriction. Possible values are
<code>boolean</code>, <code>atom</code>, <code>integer</code>, <code>float</code> 
and <code>term</code>. The default is determined from the initial value. 
Note that <code>term</code> restricts the term to be ground.
</dd>
</dl>

<p>This predicate behaves as <a id="idx:setprologflag2:136"></a><a class="pred" href="flags.html#set_prolog_flag/2">set_prolog_flag/2</a> 
if the flag already exists. See also <a class="flag" href="flags.html#flag:user_flags">user_flags</a>.
</dd>
</dl>

<p></body></html>