<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Coding-Guidelines</title><link>https://sourceforge.net/p/gnoga/wiki/Coding-Guidelines/</link><description>Recent changes to Coding-Guidelines</description><atom:link href="https://sourceforge.net/p/gnoga/wiki/Coding-Guidelines/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 12 Nov 2016 17:52:16 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/gnoga/wiki/Coding-Guidelines/feed" rel="self" type="application/rss+xml"/><item><title>Coding-Guidelines modified by Blady</title><link>https://sourceforge.net/p/gnoga/wiki/Coding-Guidelines/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -135,7 +135,7 @@
 -- TODO
 ```

-###7. Ada type
+###8. Ada type
 Ada type name is ending with "\_Type" for a common type, "\_Access" for an simple access type, "\_Class" for an access to class type.

 Example:
@@ -147,8 +147,8 @@
 ```
 &amp;gt;Discussion: (M) I think that this kind of "style" rule was really only necessarily helpful in languages like C that did not have a strong type system. (JCR) I think it fair to point out that the guidelines have to fit with the existing Gnoga code. (JPR) We are not starting a new project here, just making sure that contributors keep a standard style. IMHO, I do not fully agree with all these rules, however, whatever the rules, the important issue is to keep a uniform style.

-###8. Protype declaration
-Functions and procedures must be declared before coding the body. Comments describing a subprogram should come after it's declaration.
+###9. Protype declaration
+Functions and procedures must be declared before coding the body. Comments describing a subprogram should come after its declaration.

 Example:

@@ -166,7 +166,7 @@
 end Split;
 ```

-###9. Use clause
+###10. Use clause
 Use clause is restricted to minimum use, preferably local use to functions or procedures. Use type clause is recommended.

 Example:
@@ -188,7 +188,7 @@
 end Tab_Selected;
 ```

-###10. Code reformat
+###11. Code reformat
 Code reformat is recommended before commit to Gnoga repository.

 Example:
@@ -199,7 +199,7 @@

-###11. Style check
+###12. Style check
 GNAT style check is mandatory before commit to Gnoga repository.

 Example:
@@ -216,7 +216,7 @@
 ```

-###12. Warnings
+###13. Warnings
 For debug builds, most warnings, runtime verifications and exception tracebacks are recommended.

 Example:
@@ -237,10 +237,10 @@
 computations than the subprogram being described. (AV) But it should be shorter that unit test :-). Post conditions replacing unit test is my most favorite feature. (JRC) I'm for leaving them all on.

-###13. Plateform
+###14. Platform
 Implementation must target Linux, macOS and Windows platform. Underlying HTML, CSS, SVG and Javascript code must be conformant to https://www.w3.org/TR/ and executable at least with Firefox.

-###14. Configuration management
+###15. Configuration management
 GIT is currently used on repository https://sourceforge.net/projects/gnoga.

 Before commit, source code shall compile.
@@ -251,7 +251,7 @@
 $ make gnoga
 ```

-Before label set, tests, demos and tutos shall compile in debug mode and should execute without exceptions on at least one plateform.
+Before label set, tests, demos and tutos shall compile in debug mode and should execute without exceptions on at least one platform.

 Example:

@@ -259,11 +259,11 @@
 $ make tests demo tutorials
 ```

-###15. Compiler
+###16. Compiler
 Interface shall not be compiler dependent and implementation should not be compiler dependent.
 Both shall compile at least with GNAT FSF.

 &amp;gt;Discussion: (WP) I find it odd to ask for compiler independence at this point. When last I looked at Gnoga it depends on GNAT specific libraries and attributes (eg Unrestricted_Access). (DB) Well if someone is inspired that upgrade is doable. Most unrestricted access is just used in creating simple examples not in the framework. 

-###16. Language
+###17. Language
 The Ada language standard used is Ada 2012 without restrictions.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Blady</dc:creator><pubDate>Sat, 12 Nov 2016 17:52:16 -0000</pubDate><guid>https://sourceforge.net2eaa66d6176ec36e655df22669701232c45610f8</guid></item><item><title>Coding-Guidelines modified by Blady</title><link>https://sourceforge.net/p/gnoga/wiki/Coding-Guidelines/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="proposal-for-gnoga-coding-guidelines"&gt;Proposal for Gnoga coding guidelines:&lt;/h1&gt;
&lt;p&gt;The following guidelines apply on Gnoga framework (e.g. not on tests, demos nor tutorials).&lt;/p&gt;
&lt;h3 id="1-version-numbering"&gt;1. Version numbering&lt;/h3&gt;
&lt;p&gt;m.n with m major version number , n minor version number.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;-alpha is added on m.n when this version is created, to be used without any warranty.&lt;/li&gt;
&lt;li&gt;-beta is added on m.n when this version is enough mature to be tested.&lt;/li&gt;
&lt;li&gt;Then a letter is added on m.n when this version becomes a stable reference release (fully tested).&lt;/li&gt;
&lt;li&gt;The letter is incremented when fixes come.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For instance : 1.2-alpha, 1.2-beta, 1.2a, 1.2b, 1.2c…&lt;/p&gt;
&lt;p&gt;Version number is set in gnoga.ads and with a GIT label.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="no"&gt;version&lt;/span&gt;      &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;constant&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="p"&gt;:=&lt;/span&gt; &lt;span class="s"&gt;"1.3-alpha"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Discussion: (JRC) I still feel there should be a role for m.n&lt;br/&gt;
without any suffix.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="2-header"&gt;2. Header&lt;/h3&gt;
&lt;p&gt;Several lines of fixed comments customized with the name and type of the unit, the creation date and the name of the author.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c1"&gt;------------------------------------------------------------------------------&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--                   GNOGA - The GNU Omnificent GUI for Ada                 --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--                         G N O G A . T Y P E S                            --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--                                 S p e c                                  --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--                     Copyright (C) 2014 David Botton                      --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--  This library is free software;  you can redistribute it and/or modify   --&lt;/span&gt;
&lt;span class="c1"&gt;--  it under terms of the  GNU General Public License  as published by the  --&lt;/span&gt;
&lt;span class="c1"&gt;--  Free Software  Foundation;  either version 3,  or (at your  option) any --&lt;/span&gt;
&lt;span class="c1"&gt;--  later version. This library is distributed in the hope that it will be  --&lt;/span&gt;
&lt;span class="c1"&gt;--  useful, but WITHOUT ANY WARRANTY;  without even the implied warranty of --&lt;/span&gt;
&lt;span class="c1"&gt;--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--  As a special exception under Section 7 of GPL version 3, you are        --&lt;/span&gt;
&lt;span class="c1"&gt;--  granted additional permissions described in the GCC Runtime Library     --&lt;/span&gt;
&lt;span class="c1"&gt;--  Exception, version 3.1, as published by the Free Software Foundation.   --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--  You should have received a copy of the GNU General Public License and   --&lt;/span&gt;
&lt;span class="c1"&gt;--  a copy of the GCC Runtime Library Exception along with this program;    --&lt;/span&gt;
&lt;span class="c1"&gt;--  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see   --&lt;/span&gt;
&lt;span class="c1"&gt;--  &amp;lt;http://www.gnu.org/licenses/&amp;gt;.                                         --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--  As a special exception, if other files instantiate generics from this   --&lt;/span&gt;
&lt;span class="c1"&gt;--  unit, or you link this unit with other files to produce an executable,  --&lt;/span&gt;
&lt;span class="c1"&gt;--  this  unit  does not  by itself cause  the resulting executable to be   --&lt;/span&gt;
&lt;span class="c1"&gt;--  covered by the GNU General Public License. This exception does not      --&lt;/span&gt;
&lt;span class="c1"&gt;--  however invalidate any other reasons why the executable file  might be  --&lt;/span&gt;
&lt;span class="c1"&gt;--  covered by the  GNU Public License.                                     --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;--                                                                          --&lt;/span&gt;
&lt;span class="c1"&gt;-- For more information please go to http://www.gnoga.com                   --&lt;/span&gt;
&lt;span class="c1"&gt;------------------------------------------------------------------------------&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="3-purpose-of-the-unit"&gt;3. Purpose of the unit&lt;/h3&gt;
&lt;p&gt;Several line of comments indicating the purpose of the unit after header and before first declaration.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c1"&gt;--  This package allows for the creation of GUI applications with multiple&lt;/span&gt;
&lt;span class="c1"&gt;--  connections to the same app.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="4-coding-style"&gt;4. Coding style&lt;/h3&gt;
&lt;p&gt;Line length is limited to 120 characters.&lt;br/&gt;
Ada keyword are in lower case.&lt;br/&gt;
Ada entities are in mixed case with an underscore to separate words.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kd"&gt;procedure&lt;/span&gt; &lt;span class="nf"&gt;On_Connect_Handler&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;Event&lt;/span&gt; &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;Application_Connect_Event&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                              &lt;span class="nv"&gt;Path&lt;/span&gt;  &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;String&lt;/span&gt; &lt;span class="p"&gt;:=&lt;/span&gt; &lt;span class="s"&gt;"default"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="5-getter-and-setter"&gt;5. Getter and setter&lt;/h3&gt;
&lt;p&gt;Getter and setter names are identical as Ada provides function for getters and procedure for setters.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kd"&gt;procedure&lt;/span&gt; &lt;span class="nf"&gt;Resizable&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;Element&lt;/span&gt; &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;out&lt;/span&gt; &lt;span class="nv"&gt;Element_Type&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                     &lt;span class="nv"&gt;Value&lt;/span&gt;   &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;in&lt;/span&gt;     &lt;span class="nv"&gt;Resizable_Type&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Resizable&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;Element&lt;/span&gt; &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;Element_Type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kr"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Resizable_Type&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Discussion: (JPR) This is current practice in Gnoga, however I'm not so much in favour of it, because it prevents the usual usage that functions names are names or adjectives, while procedure names are verbs. Presumably too late to change for Gnoga.&lt;br/&gt;
(JRC) This is current Gnoga style, but I find it awkward. Standard usage is for procedure names to be verbs or verb phrases. Non-Boolean functions should be nouns or noun phrases; Boolean functions should be adjectives, adjective&lt;br/&gt;
phrases, or predicates.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="6-entity-description"&gt;6. Entity description&lt;/h3&gt;
&lt;p&gt;Entity description is lines of comments below the entity declaration.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Client_Width&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;Element&lt;/span&gt; &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;Element_Type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kr"&gt;return&lt;/span&gt; &lt;span class="kt"&gt;Natural&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;--  Inner width of an element in pixels.&lt;/span&gt;
&lt;span class="c1"&gt;--  CSS width + CSS padding - width of vertical scrollbar (if present)&lt;/span&gt;
&lt;span class="c1"&gt;--  Does not include the border or margin.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Gnatdoc annotations are recommended, see &lt;a href="http://docs.adacore.com/gnatdoc-docs/users_guide/_build/html/gnatdoc.html#annotating-source-files." rel="nofollow"&gt;http://docs.adacore.com/gnatdoc-docs/users_guide/_build/html/gnatdoc.html#annotating-source-files.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c1"&gt;-- TODO&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="7-ada-contracts"&gt;7. Ada contracts&lt;/h3&gt;
&lt;p&gt;Ada contracts Pre, Post and type invariant are recommended.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c1"&gt;-- TODO&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="7-ada-type"&gt;7. Ada type&lt;/h3&gt;
&lt;p&gt;Ada type name is ending with "_Type" for a common type, "_Access" for an simple access type, "_Class" for an access to class type.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="kt"&gt;Element_Type&lt;/span&gt; &lt;span class="kr"&gt;is&lt;/span&gt; &lt;span class="kr"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Gnoga&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Gui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Base_Type&lt;/span&gt; &lt;span class="kr"&gt;with&lt;/span&gt; &lt;span class="kd"&gt;private&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="kt"&gt;Element_Access&lt;/span&gt; &lt;span class="kr"&gt;is&lt;/span&gt; &lt;span class="kr"&gt;access&lt;/span&gt; &lt;span class="kr"&gt;all&lt;/span&gt; &lt;span class="n"&gt;Element_Type&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="kt"&gt;Pointer_To_Element_Class&lt;/span&gt; &lt;span class="kr"&gt;is&lt;/span&gt; &lt;span class="kr"&gt;access&lt;/span&gt; &lt;span class="kr"&gt;all&lt;/span&gt; &lt;span class="n"&gt;Element_Type&lt;/span&gt;&lt;span class="p"&gt;'&lt;/span&gt;&lt;span class="na"&gt;Class&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Discussion: (M) I think that this kind of "style" rule was really only necessarily helpful in languages like C that did not have a strong type system. (JCR) I think it fair to point out that the guidelines have to fit with the existing Gnoga code. (JPR) We are not starting a new project here, just making sure that contributors keep a standard style. IMHO, I do not fully agree with all these rules, however, whatever the rules, the important issue is to keep a uniform style.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="8-protype-declaration"&gt;8. Protype declaration&lt;/h3&gt;
&lt;p&gt;Functions and procedures must be declared before coding the body. Comments describing a subprogram should come after it's declaration.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Split&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;P&lt;/span&gt; &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kr"&gt;return&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;--  Split string and extract values&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Split&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;P&lt;/span&gt; &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kr"&gt;return&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="kr"&gt;is&lt;/span&gt;
&lt;span class="kr"&gt;begin&lt;/span&gt;
   &lt;span class="n"&gt;S&lt;/span&gt; &lt;span class="p"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="n"&gt;F&lt;/span&gt; &lt;span class="p"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;Index&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Source&lt;/span&gt;  &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="n"&gt;Pattern&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="n"&gt;From&lt;/span&gt;    &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;S&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="kr"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;S&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;F&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kr"&gt;end&lt;/span&gt; &lt;span class="nf"&gt;Split&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="9-use-clause"&gt;9. Use clause&lt;/h3&gt;
&lt;p&gt;Use clause is restricted to minimum use, preferably local use to functions or procedures. Use type clause is recommended.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;To_RGBA_From_RGB_or_RGBA&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;Value&lt;/span&gt; &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kr"&gt;return&lt;/span&gt; &lt;span class="n"&gt;RGBA_Type&lt;/span&gt; &lt;span class="kr"&gt;is&lt;/span&gt;
   &lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;Ada.Strings.Fixed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="n"&gt;S&lt;/span&gt;    &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt;   &lt;span class="p"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;'&lt;/span&gt;&lt;span class="na"&gt;First&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;   
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Tab_Selected&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;Item&lt;/span&gt; &lt;span class="p"&gt;: &lt;/span&gt;&lt;span class="nv"&gt;Tab_Item_Type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kr"&gt;return&lt;/span&gt; &lt;span class="kt"&gt;Boolean&lt;/span&gt;
&lt;span class="kr"&gt;is&lt;/span&gt;
   &lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;type&lt;/span&gt; &lt;span class="n"&gt;Gnoga&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Types&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RGBA_Type&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="n"&gt;Link&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Gnoga&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Gui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Element&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Element_Type&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kr"&gt;begin&lt;/span&gt;
   &lt;span class="n"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Attach_Using_Parent&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ID&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="s"&gt;"_a"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="kr"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Background_Color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Tab_Access&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parent&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;Select_Color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kr"&gt;end&lt;/span&gt; &lt;span class="nf"&gt;Tab_Selected&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="10-code-reformat"&gt;10. Code reformat&lt;/h3&gt;
&lt;p&gt;Code reformat is recommended before commit to Gnoga repository.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gnatpp -rnb -P src/gnoga.gpr
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="11-style-check"&gt;11. Style check&lt;/h3&gt;
&lt;p&gt;GNAT style check is mandatory before commit to Gnoga repository.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;-gnaty3abcefhiklmnOprsStu
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;AdaControl check is recommended before commit to Gnoga repository.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;TODO
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="12-warnings"&gt;12. Warnings&lt;/h3&gt;
&lt;p&gt;For debug builds, most warnings, runtime verifications and exception tracebacks are recommended.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;Debug_Options := ("-g", "-gnata", "-gnatq", "-gnatQ", "-gnatw.eH.YD", "-gnatVa", "-gnato", "-fstack-check", "-gnatf", "-gnateE", "-gnateF");
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;For release builds, runtime verifications disabled and optimisations enabled are recommended.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;Release_Options := ("-O2");
&lt;/pre&gt;&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Discussion: (JPR) I'm OK for disabling assertions, but not other checks (constraint_error...). I meant all forms of assertions (including Pre/Post), not just pragma Assert. The trouble is that sometimes, the post-condition needs more&lt;br/&gt;
computations than the subprogram being described. (AV) But it should be shorter that unit test :-). Post conditions replacing unit test is my most favorite feature. (JRC) I'm for leaving them all on.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="13-plateform"&gt;13. Plateform&lt;/h3&gt;
&lt;p&gt;Implementation must target Linux, macOS and Windows platform. Underlying HTML, CSS, SVG and Javascript code must be conformant to &lt;a href="https://www.w3.org/TR/" rel="nofollow"&gt;https://www.w3.org/TR/&lt;/a&gt; and executable at least with Firefox.&lt;/p&gt;
&lt;h3 id="14-configuration-management"&gt;14. Configuration management&lt;/h3&gt;
&lt;p&gt;GIT is currently used on repository &lt;a href="https://sourceforge.net/projects/gnoga."&gt;https://sourceforge.net/projects/gnoga.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Before commit, source code shall compile.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;make gnoga
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Before label set, tests, demos and tutos shall compile in debug mode and should execute without exceptions on at least one plateform.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;make tests demo tutorials
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="15-compiler"&gt;15. Compiler&lt;/h3&gt;
&lt;p&gt;Interface shall not be compiler dependent and implementation should not be compiler dependent.&lt;br/&gt;
Both shall compile at least with GNAT FSF.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Discussion: (WP) I find it odd to ask for compiler independence at this point. When last I looked at Gnoga it depends on GNAT specific libraries and attributes (eg Unrestricted_Access). (DB) Well if someone is inspired that upgrade is doable. Most unrestricted access is just used in creating simple examples not in the framework. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="16-language"&gt;16. Language&lt;/h3&gt;
&lt;p&gt;The Ada language standard used is Ada 2012 without restrictions.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Blady</dc:creator><pubDate>Fri, 11 Nov 2016 10:51:52 -0000</pubDate><guid>https://sourceforge.net6b06a519590fd204ef4b2b14c38c2f5efbbf9aa6</guid></item></channel></rss>