This file is indexed.

/usr/share/doc/gnat-gps/tutorial.html is in gnat-gps-doc 5.0-6.

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
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
<html lang="en">
<head>
<title>GNAT Programming Studio Tutorial</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNAT Programming Studio Tutorial">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 2002-2010 AdaCore.

This document is free; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, see `http://www.gnu.org/licenses/'.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<h1 class="settitle">GNAT Programming Studio Tutorial</h1>
   <div class="contents">
<h2>Table of Contents</h2>
<ul>
<li><a name="toc_Introduction" href="#Introduction">1 Introduction</a>
<li><a name="toc_Quick-overview-of-the-GPS-areas" href="#Quick-overview-of-the-GPS-areas">2 Quick overview of the GPS areas</a>
<li><a name="toc_Editing-sources" href="#Editing-sources">3 Editing sources</a>
<li><a name="toc_Building-applications" href="#Building-applications">4 Building applications</a>
<li><a name="toc_Source-Navigation" href="#Source-Navigation">5 Source Navigation</a>
<li><a name="toc_Search-Dialog" href="#Search-Dialog">6 Search Dialog</a>
<li><a name="toc_Project-View-_0028entities_0029" href="#Project-View-_0028entities_0029">7 Project View (entities)</a>
<li><a name="toc_Back-to-Source-Navigation" href="#Back-to-Source-Navigation">8 Back to Source Navigation</a>
<li><a name="toc_Code-Completion" href="#Code-Completion">9 Code Completion</a>
<li><a name="toc_Run" href="#Run">10 Run</a>
<li><a name="toc_Debug" href="#Debug">11 Debug</a>
<li><a name="toc_Call-Graph" href="#Call-Graph">12 Call Graph</a>
<li><a name="toc_Locations-View" href="#Locations-View">13 Locations View</a>
<li><a name="toc_Projects" href="#Projects">14 Projects</a>
<ul>
<li><a href="#Project-Wizard">14.1 Project Wizard</a>
<li><a href="#Project-properties">14.2 Project properties</a>
<li><a href="#Variable-editor">14.3 Variable editor</a>
<li><a href="#Switch-editor">14.4 Switch editor</a>
<li><a href="#Source-dependencies">14.5 Source dependencies</a>
<li><a href="#Project-dependencies">14.6 Project dependencies</a>
</li></ul>
<li><a name="toc_Epilogue" href="#Epilogue">15 Epilogue</a>
<li><a name="toc_GNU-Free-Documentation-License" href="#GNU-Free-Documentation-License">Appendix A GNU Free Documentation License</a>
</li></ul>
</div>



<!--  -->
<p><a name="Introduction"></a>

<h2 class="chapter">1 Introduction</h2>

<!--  -->
<p class="noindent">This document provides a guide through the major capabilities
of the GNAT Programming Studio by working on a code example: sdc, a simple
desktop calculator.

   <p>It is important to realize that the features that you are about to
experiment with are available on multiple platforms, using the same user
interface and capabilities, providing a user-friendly environment
with a tight integration between the tools.

   <p>Start GPS in the directory containing the tutorial files, or if the directory
is read-only, copy the <samp><span class="file">tutorial</span></samp> directory and its subdirectories in a
local (writable) area, and start GPS from the <samp><span class="file">tutorial</span></samp> directory, so
that GPS will load the right context.

   <p>By default, the tutorial sources can be found under
<code>&lt;prefix&gt;/share/examples/gps/tutorial</code>, where <code>&lt;prefix&gt;</code> is the
prefix directory of the GPS installation.

   <p>Alternatively, if you have already started GPS in another directory, you
can load the project <code>sdc.gpr</code> by using the menu <code>Project-&gt;Open...</code>

<!--  -->
<p><a name="Quick-overview-of-the-GPS-areas"></a>

<h2 class="chapter">2 Quick overview of the GPS areas</h2>

<!--  -->
<p class="noindent">Having launched GPS, you should now have access to a main window composed of
several areas:

     <ul>
<li>a menu bar at the top
<li>a tool bar under the menu bar
<li>a scenario view under the tool bar, on the left side
<li>a project view under the scenario view, on the left side
<li>a working area on the right of the project view
<li>a messages window under the working area
</ul>

<!--  -->
<p><a name="Editing-sources"></a>

<h2 class="chapter">3 Editing sources</h2>

<!--  -->
<p class="noindent">In the project view, open the <code>common</code> directory by clicking
on the <code>[+]</code> sign (a triangle under unix systems) on the left of
<code>common</code>. 
This will open the directory and display a list of source files located
in this directory.

   <p>Now, double click on <samp><span class="file">sdc.adb</span></samp>: this will open a source editor on this
file. The source code is syntax-highlighted: keywords, comments, strings and
characters have different colors.

   <p>As with many other properties, colors are configurable in GPS:

   <p>Select the menu <code>Edit-&gt;Preferences</code>. This will open a preferences
dialog window.

   <p>Select the <code>Editor-&gt;Fonts &amp; Colors</code> page by clicking on the cross next to
the item <code>Editor</code> and then selecting the <code>Fonts &amp; Colors</code> item.

   <p>As you go over the various lines and labels, you will notice that by
holding the mouse over a label, a tool tip pops up displaying on-line help
about the selected item.

   <p>Change the background color of the <code>Keywords</code> by clicking on the last
button, at the right of the <code>Keywords</code> line.

   <p>Choose a color, e.g a light green. When you're done with the color
selection, click on <code>OK</code> in the color selection dialog.

   <p>Click on the <code>Apply</code> button and look at the effects in the source
editor. If you like the new display, click on <code>OK</code> to confirm the
changes, otherwise clicking on <code>Cancel</code> will revert to the previous
color.

<!--  -->
<p><a name="Building-applications"></a>

<h2 class="chapter">4 Building applications</h2>

<!--  -->
<p class="noindent">Select the icon <code>Build Main: sdc.adb</code> on the toolbar (third icon
from the right): this will launch
a complete build of the <i>sdc</i> application. Note also that you can use a
key binding directly instead of this tool bar button (&lt;F4&gt;), or use the
corresponding menu item <code>Build-&gt;Project-&gt;sdc.adb</code>. If you use the menu
item, an extra intermediate dialog is displayed showing the actual command
line that will be used by GPS. Pressing &lt;Enter&gt; will launch also the build.

   <p>The build has generated a number of errors in a new window: the <i>Locations</i>
tree, displayed in the bottom area. The errors are also highlighted in the
corresponding source editor.

   <p>GPS has automatically jumped to the first error message
(<i>sdc.adb, 28:6  : (style) bad indentation</i>),
at the line (28) and column (6) of the error.

   <p>Fix the error by hand by inserting a space.

   <p>Now you can fix the next error by moving the cursor to the line 30 (press
the &lt;down&gt; arrow twice), and by using &lt;Ctrl-Tab&gt; (press first the
&lt;Control&gt; key, and then the &lt;Tab&gt; key on your keyboard): this key
combination asks the source editor to automatically re-indent the current
line.

   <p>Note that on some window managers or desktop environments,
&lt;Ctrl-Tab&gt; is already defined. If this is the case, you can change this
shortcut from the key shortcuts dialog (menu <code>Edit-&gt;Key shortcuts</code>,
<code>Menus</code> section, <code>/Edit/Format Selection</code> item).

   <p>You can then fix all the remaining errors by selecting the whole block
(from line 28 to line 40) and pressing &lt;Ctrl-Tab&gt;. To select a block,
you can either click on the left mouse button and select the area while
holding the button, or using the keyboard by pressing the &lt;Shift&gt; key
and moving the cursor using the &lt;Up&gt; or &lt;Down&gt; keys.

   <p>Press the &lt;F4&gt; key to build again. GPS will automatically save the
modified files, and start a build. This behavior (automatic saving of files
before building) can be configured in the preferences dialog.

   <p>If you look at the bottom right of the GPS window, you will notice that a
progress bar has appeared, displaying the current number of files compiled,
and the number of remaining files. This progress bar disappears when the
build is finished.

   <p>This should now report a successful build.

<!--  -->
<p><a name="Source-Navigation"></a>

<h2 class="chapter">5 Source Navigation</h2>

<!--  -->
<p class="noindent">Now let's try to understand a little bit about how the program is working by
looking at the <samp><span class="file">sdc.adb</span></samp> editor: there's a loop, the main processing is
done by the functions Process and Next (at line 30).

   <p>Click around line 30, move the mouse over <code>Process</code> and let a tool tip
appear (<code>Tokens.Process global procedure declared at tokens.ads:19</code>): this
gives information about the kind of entity and the location (file and line) of
the declaration of this procedure, the profile of the parameters, and
documentation for this function, as extracted from the comments surrounding
the procedure declaration.

   <p>Do the same for <code>Next</code> (<code>Tokens.Next global function declared at
tokens.ads:15</code>).

   <p>Keeping the mouse over <code>Next</code>, display the contextual menu by clicking on
the right mouse button,
then click on <code>Goto declaration of Next</code>: we're now in the package
<code>Tokens</code>, in file <samp><span class="file">tokens.ads</span></samp>; but where is this file in the project?

<!--  -->
<p><a name="Search-Dialog"></a>

<h2 class="chapter">6 Search Dialog</h2>

<!--  -->
<p class="noindent">Select the menu <code>Navigate-&gt;Find or Replace...</code>: this will open a search
dialog. 
In the <code>Search for:</code> text entry type <samp><span class="file">tokens.ads</span></samp>. Then
select <code>Project view</code> in the <code>Look in:</code> area. The search
area provides an easy way to search for text or regular expressions in
several contexts including the current file, the project view, <small class="dots">...</small>

   <p>Now click on <code>Find</code>. The file <samp><span class="file">tokens.ads</span></samp>, in directory <code>struct</code>
is highlighted.

   <p>Close the search dialog by clicking on the <code>Close</code> button.

   <p>Note that in this specific case, a simpler way to locate a file in the
project view is to use the contextual menu from the source editor:
<code>Locate in Project View: tokens.ads</code>.

<!--  -->
<p><a name="Project-View-(entities)"></a>
<a name="Project-View-_0028entities_0029"></a>

<h2 class="chapter">7 Project View (entities)</h2>

<!--  -->
<p class="noindent">Click on the <code>[+]</code> sign (or triangle) to open <samp><span class="file">tokens.ads</span></samp> entities. 
When you click on a file in the project view, you get
language sensitive information about the file, such as
<code>packages</code>, <code>subprograms</code>, <code>tasks</code>, ... for <code>Ada</code>.

   <p>Open the <code>subprogram</code> category, click on <code>Process</code>: this
will open <samp><span class="file">tokens.ads</span></samp> and move the cursor on the first line
corresponding to the procedure <code>Process</code>.

   <p>Similarly, click on <code>Next</code>, and move your mouse on <code>Next</code>
in the source editor.

<!--  -->
<p><a name="Back-to-Source-Navigation"></a>

<h2 class="chapter">8 Back to Source Navigation</h2>

<!--  -->
<p class="noindent">Move the mouse over the <code>Next</code> identifier in <samp><span class="file">tokens.ads</span></samp> editor,
and then hold the &lt;Control&gt; key: while you're holding the key, move the
mouse over entities: these entities now become clickable hyperlinks. Clicking
on the first mouse button will go to the declaration of the entity highlighted
(or the body if you are already on the declaration), and clicking on the
middle mouse button will go to the body directly: move
the mouse back to <code>Next</code> and click. Alternatively, you can use the
the contextual menu and select <code>Goto body of Next</code>; then
scroll through the procedure <code>Next</code>, move the mouse on
<code>Instructions.Read</code> at line 46, hold &lt;control&gt; again and
click with the middle mouse button (or from the contextual menu, select
<code>Goto body of Read</code>).

   <p>We've now navigated quite a bit through the application source code,
which you can verify by clicking on the left arrow in the tool bar, to go
back to the previous locations visited.

   <p>Repeat the operation until you're back in <samp><span class="file">sdc.adb</span></samp>. 
As with the undo/redo capability in the source editor, the
<code>goto previous/next location</code> is infinite.

<!--  -->
<p><a name="Code-Completion"></a>

<h2 class="chapter">9 Code Completion</h2>

<!--  -->
<p class="noindent">Go on the line 38 of sdc.adb. You can see that there is a null instruction for
the case of Stack.Overflow. We are going to add some code here, using the
code assist capabilities.

   <p>Type &lt;enter&gt; to create a new line, and then <code>Scr</code>, and hit
&lt;Ctrl+Space&gt;. 
A completion popup will be displayed, showing all the entities of the project
begining with <code>Scr</code>. Select <code>Screen_Output</code>. The code will be
automatically completed in the editor. Then add a dot in your code. The
completion popup will be automatically triggered, and will offer you to
complete your code with the entities contained in the <code>Screen_Output</code>
package. Select <code>Msg</code>, add a space, and then an open parenthesis. Once
again, the completion windows will pop up, and show you the possible parameters
for msg. If you choose the first entry of the completion list
("params of Msg"), the call will
be automatically completed by a list of named parameters. Complete the list by
giving e.g. <code>"The stack is full."</code> for <code>S1</code>, <code>""</code> for <code>S2</code>,
and <code>True</code> for <code>End_Line</code>.

   <p>Don't forget to add a semicolon at the end of the instruction. Then hit &lt;F4&gt;
in order to rebuild the application.

<!--  -->
<p><a name="Run"></a>

<h2 class="chapter">10 Run</h2>

<!--  -->
<p class="noindent">It is now time to run the application: select the menu
<code>Build-&gt;Run-&gt;sdc</code>, which will open a dialog window. 
Type <code>input.txt</code> in the text entry: this is the name of a text
file that will be passed as argument to the <i>sdc</i> program.

   <p>Now click on <code>OK</code>: a new window titled <code>Run: sdc input.txt</code>
is created at the bottom of the main window where the sdc application
runs and displays an unexpected internal error: this is a good opportunity
to use the integrated debugger.

   <p>Close the execution window by clicking on the x icon on the top right
corner of this window.

<!--  -->
<p><a name="Debug"></a>

<h2 class="chapter">11 Debug</h2>

<!--  -->
<p class="noindent">Open the preferences dialog (menu <code>Edit-&gt;Preferences</code>) and
click on the <code>Debugger</code> item on the left; set the button
<code>Break on exceptions</code> to <i>Enabled</i>: this will enable by default a special
breakpoint every time an exception is raised. Click on <code>OK</code> to confirm your
change.

   <p>Now select the menu <code>Debug-&gt;Initialize-&gt;sdc</code>: a new window is
created: this is the debugger console. 
You can also look at the various debug menu item and tool bar buttons which are
now activated.

   <p>Use the menu <code>Debug-&gt;Data-&gt;Call Stack</code>: this opens a new window on the
right of the source editors. If you select the contextual menu in the call
stack, various pieces of information can be displayed or
removed in the call stack. From this contextual menu, add the
<code>Frame Number</code> info by clicking on it.

   <p>Now select the menu <code>Debug-&gt;Run...</code>. Notice that <code>input.txt</code> has
been filled automatically for you since the two menus <code>Build-&gt;Run...</code> and
<code>Debug-&gt;Run...</code> are synchronized. Click on <code>OK</code>: the debugger should
stop on an exception (<code>Constraint_Error</code> in the file <samp><span class="file">stack.adb</span></samp>, at
line 49).

   <p>Go up in the call stack by clicking on the <code>tokens.process</code> line
(frame number 6 or 7, depending on your GNAT version).

   <p>If you move the mouse over the parameter <code>T</code> at line 64, a tool tip is
displayed showing the value of <code>T</code>. You have probably noticed that
tool tips, like menus, are contextual: depending on the current session and
on the entity selected, different information is displayed.

   <p>Select the contextual menu <code>Debug-&gt;Display T</code>: this will open a new
window: the data window, with a box displaying graphically the contents
of the different fields of <code>T</code>, each clearly separated.

   <p>On <code>T</code> data display, select the contextual menu
<code>Display-&gt;Show Value + Type</code>: this displays for all fields both their
type and value.

   <p>Special colors are used in the data display: blue for pointers that can be
dereferenced by a double-click (double click on <code>T.val</code>); red for fields
that have been modified since last step.

   <p>From the T box, right-click to display the contextual menu and
select <code>View memory at address of T</code>: a memory view is opened. 
Use the <code>up</code> and <code>down</code> arrows on the right to visit memory.

   <p>Click in the memory dump, and modify it by typing numbers. Notice the
red color for modified values;
click on <code>Undo Changes</code> to cancel the modifications;
click on <code>Close</code> to close the memory window.

   <p>In the call stack, go back to <code>stack.push</code> frame (num 4 or 5). 
Move the mouse over <code>Last</code> and let the debugger display its value: 0. 
From the contextual menu, select <code>Goto declaration of Last</code>: this
will jump to the line 16 of <samp><span class="file">stack.adb</span></samp>, where you can see that
<code>Last</code> is a <code>Natural</code>. Now click on the <code>Goto Previous Location</code>
button in the tool bar: we're now back at line 49 where we can see that for a
<code>Push</code> procedure, <code>Last</code> should be incremented, and not decremented.

   <p>Fix the line to <code>Last := Last + 1;</code>

   <p>Save the file (&lt;Ctrl-S&gt;);
End the debug session: menu <code>Debug-&gt;Terminate</code>;
Rebuild (press &lt;F4&gt; key);
Rerun (menu <code>Build-&gt;Run-&gt;sdc</code>, click on <code>OK</code>): the program now
completes as expected. Close the execution window.

<!--  -->
<p><a name="Call-Graph"></a>

<h2 class="chapter">12 Call Graph</h2>

<!--  -->
<p class="noindent">Now go back to the file <samp><span class="file">sdc.adb</span></samp>, move the mouse over the procedure
<i>sdc</i> at line 8, select the contextual menu
<code>Browsers-&gt;Sdc calls</code>: this will open a new window titled
<i>Call graph browser</i>.

   <p>Note that there is also a top level contextual menu (<code>Sdc calls</code>)
which provides a tree view of the callers/callees.

   <p>In the call graph, click on the right arrow of <code>Process</code> (one of the
first items on the top). Also click on the right arrow of <code>error_msg</code>.

   <p>Select <code>Orthogonal links</code> in the contextual menu of the graph to change the
way links are displayed in the graph. 
You may then play with the zoom (&lt;=&gt; and &lt;-&gt; keys).

   <p>If you select <code>Hide links</code> from <code>error_msg</code> contextual menu, this
will hide all the links that are related to this item: the link between the
callers and callees of <code>error_msg</code> are no longer displayed. This can
be useful when the graph becomes complex, to hide some parts. If you go back to
the contextual menu, you can now select <code>Show links</code> to show the links
again.

   <p>Click on right arrow of <code>process</code> (<code>(Decl) instructions.ads:12</code>).

   <p>The items can also be moved: move e.g <code>msg</code> item around.

   <p>You can also recompute the layout of all the current items by using
the browser's contextual menu <code>Refresh layout</code> (move the mouse on the
browser's background, with no box underneath, and right click).

   <p>Click on left arrow of <code>msg</code>
to display who is calling <code>msg</code>. Notice that <code>view</code> calls <code>msg</code>.

   <p>Click on left arrow of <code>view</code>: the arrow disappears, and no
new items are created, which means that <code>view</code> isn't called by anyone,
so we're now going to remove this procedure.

<!--  -->
<p><a name="Locations-View"></a>

<h2 class="chapter">13 Locations View</h2>

<!--  -->
<p class="noindent">From <i>view</i>, click on the blue link: <code>stack.ads:32</code>, this will open
the file <samp><span class="file">stack.ads</span></samp> at line 32. 
Then from the source editor (file <samp><span class="file">stack.ads</span></samp>), select the contextual
menu <code>References-&gt;Find all references to View</code>: this highlights the
<code>Locations</code> tree which now contains all the references for <code>view</code>,
grouped by files (<samp><span class="file">stack.ads</span></samp> and <samp><span class="file">stack.adb</span></samp>).

   <p>The first location is highlighted automatically: this is the spec of the
procedure <code>View</code>. Now click in the tree on the <code>+</code> sign (or
triangle) at the left
of <samp><span class="file">stack.adb</span></samp>: two locations are listed, at line 90 and 97. 
Click on each of these locations: they correspond to the procedure body.

   <p>The <code>Find all references</code> capability is another way to list all the uses of
an entity, and it confirms that <code>View</code> isn't called in our project.

   <p>Remove <i>View</i> body by e.g selecting it, and pressing the &lt;Delete&gt; key,
then save the file (&lt;Ctrl-S&gt;).

   <p>Do the same for the spec, save the file.

   <p>Close the <samp><span class="file">stack.ads</span></samp> and <samp><span class="file">stack.adb</span></samp> files (menu File-&gt;Close,
or using the shortcut &lt;Ctrl-W&gt;). 
Rebuild by pressing the &lt;F4&gt; key.

<!-- "Let's now have a look at all the changes we've done so far, by looking at -->
<!-- the version control system explorer, aka VCS explorer" -->
<!--  -->
<!-- @node Version Control -->
<!-- @chapter Version Control -->
<!--  -->
<!-- @noindent -->
<!-- From the project view, contextual menu on project @i{sdc}, select -->
<!-- @code{Version Control->Query status for project}. The VCS Explorer is -->
<!-- opened, listing the files in the project. -->
<!-- => Explain the use of icons for status, log files, ... -->
<!-- => The list can be sorted by status or by file name, by clicking -->
<!-- on the @code{Status} and @code{File name} labels. -->
<!-- Move the mouse over @file{stack.ads}, select the contextual menu -->
<!-- @code{Compare against head rev.}: -->
<!-- this will open a visual comparison between the version in the repository, -->
<!-- and the local (modified) file; You can see that scrolling is synchronized -->
<!-- between the two files, and that colors are used to show lines -->
<!-- added, removed and modified. -->
<!-- Close the Visual Comparison window -->
<!-- Go back to the VCS Explorer -->
<!-- On @file{stack.ads}, contextual menu, @code{Edit changelog} -->
<!-- In the change log, type a log, e.g: @code{(View): Removed, since unused} -->
<!-- Save and close the log editor. -->
<!-- This log file will now associated with @file{stack.ads} until the -->
<!-- next check in. -->
<!-- Go back to the VCS Explorer, @file{stack.ads} has now an icon -->
<!-- showing that a log is associated with this file. -->
<!-- On @file{stack.ads}, commit the file using the contextual menu, -->
<!-- entry @code{Commit}. -->
   <p>Let's now see how to create a project corresponding to the <i>sdc</i>
project we've used in this tutorial.

<!--  -->
<p><a name="Projects"></a>

<h2 class="chapter">14 Projects</h2>

<!--  -->
<p><a name="Project-Wizard"></a>

<h3 class="section">14.1 Project Wizard</h3>

<p class="noindent">Go to the menu <code>Project-&gt;New...</code>: this is a standard wizard, with various
steps listed on the left area of the window.

   <p>The first page of the wizard allows you to select what kind of project you
want to build, depending on the information you have. Select the default
choice <code>Single Project</code>, and press <code>Forward</code>.

   <p>Type <i>sdc2</i> in the project name field.

   <p>Click on <code>Forward</code>: we are now on the language selection page. 
It is possible to create a multi-language project by e.g. selecting the C or C++
check box.

   <p>Click on <code>Forward</code>: we are now on the <code>VCS page</code>. <i>VCS</i> stands
for <i>Version Control System</i>. 
GPS provides a generic framework for <i>VCS</i> which allows it to support
new systems easily. Systems supported by default are CVS, ClearCase,
Subversion and GIT. Select <code>Auto</code>, which means that GPS will automatically
detect the version control system used, if any.

   <p>Click on <code>Forward</code>: this is the source directories selection,
used to specify the project's sources. Click on the <code>Add</code> button,
and select the <code>struct</code> directory, then click on <code>OK</code> to validate.

   <p>Click on <code>Forward</code>: this is the <code>Build</code> and <code>Exec</code> directory
selection, used to store object, ali files, ...

   <p>Click on the first <code>Browse</code> button, then click on
<code>obj</code>, and finally click on <code>OK</code>.

   <p>Click on <code>Forward</code>: this is the main units selection, used mainly for
building executables and debugging.

   <p>Click on <code>Add</code>, open the <code>common</code> directory and select
<code>sdc.adb</code>.

   <p>Click on <code>Forward</code>: this is the naming scheme editor. 
GNAT is very flexible and can use any kind of naming scheme for Ada files. 
In particular, you can easily set the default file
extensions (e.g by using one of the predefined schemes) and you
can also specify exceptions that use non standard file names.

   <p>Click on <code>Forward</code>: we're now in the switch selector. 
Select <code>Recompile if switches changed</code>.

   <p>Click on <code>Ada</code> page.

   <p>Select <code>Full errors</code> and <code>Overflow checking</code>. 
The boxes and the command line (the text entry at the
bottom of the page) are fully synchronized, e.g if you click on the
command line, and change <code>-gnatf</code> to <code>-gnat</code>, the
<code>Full errors</code> check box is unselected; now type <code>a</code> to get
<code>-gnata</code>, and notice that <code>Enable assertions</code> is now selected.

   <p>We've now created a project similar to the one used in this tutorial.

   <p>Click on <code>Cancel</code> to close the wizard.

   <p>Clicking on <code>Apply</code> instead would have created the project file
and loaded it in GPS.

<p><a name="Project-properties"></a>

<h3 class="section">14.2 Project properties</h3>

<p class="noindent">In the project view, on the project <i>sdc</i>, use the contextual menu
<code>Project-&gt;Properties</code>. 
All the properties set in the project wizard can be found here as well. 
You can switch between pages by clicking on the tabs located along the
left side of the window.

   <p>Once you're done exploring the property pages, click on the <code>Cancel</code>
button to close the properties window.

<p><a name="Variable-editor"></a>

<h3 class="section">14.3 Variable editor</h3>

<p class="noindent">Select the window titled "Scenario".  If not available, you can open it
using the menu <code>Tools-&gt;Views-&gt;Scenario</code>. 
This window contains a <code>Build</code> label.

   <p>This is a configuration variable. With GPS and the GNAT
project facility, you can define as many configuration variables as you want,
and modify any project settings (e.g. switches, sources, ...) based on the
values of configuration variables. These variables can also take any
number of different values.

   <p>The <code>Build</code> variable demonstrates a typical <code>Debug/Production</code>
configuration where we've set different switches for the two modes.

   <p>Click on the button at the left (<code>Edit variable properties</code>): this
is the variable editor, where values can be added or renamed. 
Close the variable editor by clicking on the <code>Cancel</code> button.

   <p>Now, let's take a look at the switches set in the project.

<p><a name="Switch-editor"></a>

<h3 class="section">14.4 Switch editor</h3>

<p class="noindent">Select the menu item <code>Project-&gt;Edit File Switches</code>: a global
switch editor is displayed in the working area, showing the
switches associated with each file in the <code>sdc</code> project.

   <p>The editor lists the switches associated with each file in the project. 
Gray entries indicate default (global) switches.  Notice that
<samp><span class="file">screen_output.adb</span></samp> has specific switches, which are highlighted
using a different font.

   <p>Switch between <code>Debug</code> and <code>Production</code> mode in the <code>Build</code>
combo box: the switches are updated automatically.

   <p>Back to our project, let's now examine the dependencies between sources.

<p><a name="Source-dependencies"></a>

<h3 class="section">14.5 Source dependencies</h3>

<p class="noindent">Select <samp><span class="file">sdc.adb</span></samp> in the <code>Project View</code> and then the contextual menu
item <code>Show dependencies for sdc.adb</code>: this will open a new graph showing
the dependencies between sources of the project.

   <p>Click on the right arrow of <samp><span class="file">tokens.ads</span></samp> to display the files that
<samp><span class="file">tokens.ads</span></samp> depends on. Similarly, click on the right arrow of
<samp><span class="file">stack.ads</span></samp>.

<p><a name="Project-dependencies"></a>

<h3 class="section">14.6 Project dependencies</h3>

<p class="noindent">Back in the project view, on the <i>Sdc</i> project, select the contextual
menu <code>Project-&gt;Dependencies</code>, then on the <code>Add From File</code>,
then open the <i>tutorial</i>
directory and click on the <code>projects</code> subdirectory. Select the file
<code>prj1.gpr</code>. Click on <code>Apply</code> to validate the change.

   <p>You can see the new dependency added in the project view, as a tree of
projects. In particular, project dependencies are duplicated: if you open
the <code>prj1</code> icon by clicking on the <code>[+]</code> sign (or triangle), and then
similarly open the <code>prj2</code> icon, you will notice that the project
<code>prj4</code> is displayed twice: once as a dependency of <code>prj2</code>, and
once as a dependency of <code>prj1</code>.

   <p>GPS can also display the graph of dependencies between projects: on <i>Sdc</i>
project, use the contextual menu
<code>Show projects imported by Sdc</code>: this will open a project hierarchy
browser.

   <p>On the <code>Sdc.gpr</code> project, select the contextual menu
<code>Show projects imported by Sdc recursively</code>.

   <p>In the browser, you can move the project items, and select them to highlight
the dependencies.

<!--  -->
<p><a name="Epilogue"></a>

<h2 class="chapter">15 Epilogue</h2>

<!--  -->
<p class="noindent">This terminates our tour of GPS, the GNAT Programming Studio. 
We hope this tutorial gave you a good overview of the general capabilities
available with GPS. A non exhaustive list of the features not mentioned in
this document includes:

     <ul>
<li>Documentation generation
<li>Automatic generation of body files
<li>Pretty printing
<li>Visual comparison of files
<li>Version control
<li>Flexible multiple document interface
<li>Code coverage
</ul>

   <p>For more information, please look at the <i>User's Guide</i> (<a href="gps.html">gps.html</a>),
and also look at the <code>Tools</code> menu which gives access to most of these
capabilities.

<!-- ********************************** -->
<!-- * GNU Free Documentation License * -->
<!-- ********************************** -->
<p><a name="GNU-Free-Documentation-License"></a>

<h2 class="appendix">Appendix A GNU Free Documentation License</h2>

<p><a name="index-GNU-Free-Documentation-License-1"></a><a name="index-License_002c-GNU-Free-Documentation-2"></a><a name="index-Free-Documentation-License_002c-GNU-3"></a>
<!-- GNU Free Documentation License -->
Version 1.1, March 2000
   <pre class="sp">

</pre>
Copyright &copy; 2000 Free Software Foundation, Inc. 
<br>
59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   <pre class="sp">

</pre>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

<h3 class="heading">0. PREAMBLE</h3>

<p>The purpose of this License is to make a manual, textbook, or other
written document &ldquo;free&rdquo; in the sense of freedom: to assure everyone
the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially.  Secondarily,
this License preserves for the author and publisher a way to get
credit for their work, while not being considered responsible for
modifications made by others.

   <p>This License is a kind of &ldquo;copyleft&rdquo;, which means that derivative
works of the document must themselves be free in the same sense.  It
complements the GNU General Public License, which is a copyleft
license designed for free software.

   <p>We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does.  But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book.  We recommend this License
principally for works whose purpose is instruction or reference.

<h3 class="heading">1. APPLICABILITY AND DEFINITIONS</h3>

<p>This License applies to any manual or other work that contains a
notice placed by the copyright holder saying it can be distributed
under the terms of this License.  The &ldquo;Document&rdquo;, below, refers to any
such manual or work.  Any member of the public is a licensee, and is
addressed as &ldquo;you&rdquo;.

   <p>A &ldquo;Modified Version&rdquo; of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.

   <p>A &ldquo;Secondary Section&rdquo; is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject.  (For example, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.)  The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.

   <p>The &ldquo;Invariant Sections&rdquo; are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.

   <p>The &ldquo;Cover Texts&rdquo; are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.

   <p>A &ldquo;Transparent&rdquo; copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters.  A copy made in an otherwise Transparent file
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent.  A copy that is
not &ldquo;Transparent&rdquo; is called &ldquo;Opaque&rdquo;.

   <p>Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification.  Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.

   <p>The &ldquo;Title Page&rdquo; means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page.  For works in
formats which do not have any title page as such, &ldquo;Title Page&rdquo; means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.

<h3 class="heading">2. VERBATIM COPYING</h3>

<p>You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License.  You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute.  However, you may accept
compensation in exchange for copies.  If you distribute a large enough
number of copies you must also follow the conditions in section 3.

   <p>You may also lend copies, under the same conditions stated above, and
you may publicly display copies.

<h3 class="heading">3. COPYING IN QUANTITY</h3>

<p>If you publish printed copies of the Document numbering more than 100,
and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover.  Both covers must also clearly and legibly identify
you as the publisher of these copies.  The front cover must present
the full title with all words of the title equally prominent and
visible.  You may add other material on the covers in addition. 
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.

   <p>If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.

   <p>If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the
general network-using public has access to download anonymously at no
charge using public-standard network protocols.  If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.

   <p>It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.

<h3 class="heading">4. MODIFICATIONS</h3>

<p>You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it.  In addition, you must do these things in the Modified Version:
     <ol type=A start=1>
<li>Use in the Title Page (and on the covers, if any) a title distinct
   from that of the Document, and from those of previous versions
   (which should, if there were any, be listed in the History section
   of the Document).  You may use the same title as a previous version
   if the original publisher of that version gives permission. 
<li>List on the Title Page, as authors, one or more persons or entities
   responsible for authorship of the modifications in the Modified
   Version, together with at least five of the principal authors of the
   Document (all of its principal authors, if it has less than five). 
<li>State on the Title page the name of the publisher of the
   Modified Version, as the publisher. 
<li>Preserve all the copyright notices of the Document. 
<li>Add an appropriate copyright notice for your modifications
   adjacent to the other copyright notices. 
<li>Include, immediately after the copyright notices, a license notice
   giving the public permission to use the Modified Version under the
   terms of this License, in the form shown in the Addendum below. 
<li>Preserve in that license notice the full lists of Invariant Sections
   and required Cover Texts given in the Document's license notice. 
<li>Include an unaltered copy of this License. 
<li>Preserve the section entitled &ldquo;History&rdquo;, and its title, and add to
   it an item stating at least the title, year, new authors, and
   publisher of the Modified Version as given on the Title Page.  If
   there is no section entitled &ldquo;History&rdquo; in the Document, create one
   stating the title, year, authors, and publisher of the Document as
   given on its Title Page, then add an item describing the Modified
   Version as stated in the previous sentence. 
<li>Preserve the network location, if any, given in the Document for
   public access to a Transparent copy of the Document, and likewise
   the network locations given in the Document for previous versions
   it was based on.  These may be placed in the &ldquo;History&rdquo; section. 
   You may omit a network location for a work that was published at
   least four years before the Document itself, or if the original
   publisher of the version it refers to gives permission. 
<li>In any section entitled &ldquo;Acknowledgements&rdquo; or &ldquo;Dedications&rdquo;,
   preserve the section's title, and preserve in the section all the
   substance and tone of each of the contributor acknowledgements
   and/or dedications given therein. 
<li>Preserve all the Invariant Sections of the Document,
   unaltered in their text and in their titles.  Section numbers
   or the equivalent are not considered part of the section titles. 
<li>Delete any section entitled &ldquo;Endorsements&rdquo;.  Such a section
   may not be included in the Modified Version. 
<li>Do not retitle any existing section as &ldquo;Endorsements&rdquo;
   or to conflict in title with any Invariant Section.
        </ol>

   <p>If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant.  To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice. 
These titles must be distinct from any other section titles.

   <p>You may add a section entitled &ldquo;Endorsements&rdquo;, provided it contains
nothing but endorsements of your Modified Version by various
parties &ndash; for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.

   <p>You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version.  Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity.  If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.

   <p>The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.

<h3 class="heading">5. COMBINING DOCUMENTS</h3>

<p>You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice.

   <p>The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy.  If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number. 
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.

   <p>In the combination, you must combine any sections entitled &ldquo;History&rdquo;
in the various original documents, forming one section entitled
&ldquo;History&rdquo;; likewise combine any sections entitled &ldquo;Acknowledgements&rdquo;,
and any sections entitled &ldquo;Dedications&rdquo;.  You must delete all sections
entitled &ldquo;Endorsements.&rdquo;

   <p>Heading 6. COLLECTIONS OF DOCUMENTS

   <p>You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.

   <p>You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.

<h3 class="heading">7. AGGREGATION WITH INDEPENDENT WORKS</h3>

<p>A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version
of the Document, provided no compilation copyright is claimed for the
compilation.  Such a compilation is called an &ldquo;aggregate&rdquo;, and this
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they
are not themselves derivative works of the Document.

   <p>If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one quarter
of the entire aggregate, the Document's Cover Texts may be placed on
covers that surround only the Document within the aggregate. 
Otherwise they must appear on covers around the whole aggregate.

<h3 class="heading">8. TRANSLATION</h3>

<p>Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4. 
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections.  You may include a
translation of this License provided that you also include the
original English version of this License.  In case of a disagreement
between the translation and the original English version of this
License, the original English version will prevail.

<h3 class="heading">9. TERMINATION</h3>

<p>You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License.  Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License.  However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.

<h3 class="heading">10. FUTURE REVISIONS OF THIS LICENSE</h3>

<p>The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time.  Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.  See
http://www.gnu.org/copyleft/.

   <p>Each version of the License is given a distinguishing version number. 
If the Document specifies that a particular numbered version of this
License &ldquo;or any later version&rdquo; applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation.  If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.

<h3 class="heading">ADDENDUM: How to use this License for your documents</h3>

<p>To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
<blockquote>
Copyright (c)  YEAR  YOUR NAME. 
<br>
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. 
A copy of the license is included in the section entitled &ldquo;GNU
Free Documentation License&rdquo;. 
</blockquote>

   <p>If you have no Invariant Sections, write &ldquo;with no Invariant Sections&rdquo;
instead of saying which ones are invariant.  If you have no
Front-Cover Texts, write &ldquo;no Front-Cover Texts&rdquo; instead of
&ldquo;Front-Cover Texts being LIST&rdquo;; likewise for Back-Cover Texts.

   <p>If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

<!-- GNU Free Documentation License -->
<!-- @printindex cp -->
</body></html>