From: <jb...@us...> - 2009-01-06 08:24:24
|
Revision: 9260 http://plplot.svn.sourceforge.net/plplot/?rev=9260&view=rev Author: jbauck Date: 2009-01-06 08:24:22 +0000 (Tue, 06 Jan 2009) Log Message: ----------- Replace all instances of Advance_To_Subpage(0) with Advance_To_Subpage(Next_Subpage) in thick Ada examples. Replace one instance of PL_PARSE_FULL in a thick Ada example with Parse_Full. Tweak ada.xml docs. Modified Paths: -------------- trunk/doc/docbook/src/ada.xml trunk/examples/ada/xthick01a.adb.cmake trunk/examples/ada/xthick02a.adb.cmake trunk/examples/ada/xthick04a.adb.cmake trunk/examples/ada/xthick06a.adb.cmake trunk/examples/ada/xthick07a.adb.cmake trunk/examples/ada/xthick08a.adb.cmake trunk/examples/ada/xthick15a.adb.cmake trunk/examples/ada/xthick16a.adb.cmake Modified: trunk/doc/docbook/src/ada.xml =================================================================== --- trunk/doc/docbook/src/ada.xml 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/doc/docbook/src/ada.xml 2009-01-06 08:24:22 UTC (rev 9260) @@ -66,7 +66,7 @@ </sect2> <sect2 id="ada_thick_enhanced"> <title>Standard Thick Binding Using Enhanced Names</title> - <para> The distinguishing feature of this thick binding (the "standard" binding) is to provide more descriptive names for PLplot subroutines, variables, constants, arguments, and other objects. Most Ada programmers will be more comfortable using these names. For example, in the C API as well as the thin Ada binding and the other thick Ada binding, the procedure <literal>plcol0(1)</literal> sets the drawing color to red. In the standard thick binding, the same thing is accomplished by writing <literal>Set_Color(Red)</literal>. The Ada program may just as well write <literal>Set_Color(1)</literal> since the binding merely sets a constant <literal>Red</literal> to be equal to the integer <literal>1</literal>. Many such numeric constants from the C API are given names in this thick binding. These renamed integers are discussed more fully in Section 7.2.</para> + <para> The distinguishing feature of this thick binding (the "standard" binding) is to provide more descriptive names for PLplot subroutines, variables, constants, arguments, and other objects. Most Ada programmers will be more comfortable using these names. For example, in the C API as well as the thin Ada binding and the other thick Ada binding, the procedure <literal>plcol0(1)</literal> sets the drawing color to red. In the standard thick binding, the same thing is accomplished by writing <literal>Set_Pen_Color(Red)</literal>. The Ada program may just as well write <literal>Set_Pen_Color(1)</literal> since the binding merely sets a constant <literal>Red</literal> to be equal to the integer <literal>1</literal>. Many such numeric constants from the C API are given names in this thick binding. These renamed integers are discussed more fully in Section 7.2.</para> <para> The disadvantage of this renaming is that it makes referring to the PLplot documentation somewhat awkward. There might be, at some time, a utility for easing this problem by providing an HTML file with links so that a "normal" PLplot name can be linked to the "Ada" name along with the appropriate entry in the Ada specification, as well as another HTML file with links from the "Ada" name directly to the PLplot web page that documents that name. It might also be possible to provide an alternate version of the documentation with the enhanced names used. (The developer of the bindings has a sed file prepared which makes most of the subroutine-name substitutions.) However, this thick binding retains the original C subprogram names as comments immediately above the function or procedure name in the code listing so it is relatively easy to locate the relevant item in the PLplot documentation.</para> <para> One simple rule applies in reading the PLplot API documentation: the argument names are in the same order in Ada as in the PLplot documentation (the names are different) except that all array lengths are eliminated. The PLplot documentation, for each subroutine, shows a "redacted" version which should be correct for Ada as well as other languages which have proper arrays.</para> <para> The standard bindings are in the Ada files <literal>plplot.ads</literal> and <literal>plplot.adb</literal>.</para> Modified: trunk/examples/ada/xthick01a.adb.cmake =================================================================== --- trunk/examples/ada/xthick01a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick01a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -125,7 +125,7 @@ Box_Around_Viewport("bcnst", 60.0, 2, "bcnstv", 0.2, 2); -- Superimpose a dashed line grid, with 1.5 mm marks and spaces. - -- plstyl expects a pointer! (-- Not Ada.) + -- Set_Line_Style expects a pointer! (-- Not Ada.) Set_Line_Style(mark1, space1); Set_Pen_Color(Yellow); Box_Around_Viewport("g", 30.0, 0, "g", 0.2, 0); Modified: trunk/examples/ada/xthick02a.adb.cmake =================================================================== --- trunk/examples/ada/xthick02a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick02a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -61,7 +61,7 @@ for i in 0..(nw-1) loop Set_Pen_Color(i+cmap0_offset); - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); vmin := 0.1; vmax := 0.9; for j in 0..2 loop Modified: trunk/examples/ada/xthick04a.adb.cmake =================================================================== --- trunk/examples/ada/xthick04a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick04a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -90,7 +90,7 @@ begin -- Parse and process command line arguments - Parse_Command_Line_Arguments(PL_PARSE_FULL); + Parse_Command_Line_Arguments(Parse_Full); -- Initialize plplot Initialize_PLplot; Modified: trunk/examples/ada/xthick06a.adb.cmake =================================================================== --- trunk/examples/ada/xthick06a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick06a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -52,7 +52,7 @@ -- Initialize plplot Initialize_PLplot; - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); -- Set up viewport and window Set_Pen_Color(2); Modified: trunk/examples/ada/xthick07a.adb.cmake =================================================================== --- trunk/examples/ada/xthick07a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick07a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -56,7 +56,7 @@ Set_Characer_Set(1); for l in 0 .. 16 loop - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); -- Set up viewport and window Set_Pen_Color(2); Modified: trunk/examples/ada/xthick08a.adb.cmake =================================================================== --- trunk/examples/ada/xthick08a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick08a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -154,7 +154,7 @@ for k in alt'range loop for ifshade in 0 .. 3 loop - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); Set_Viewport_Normalized(0.0, 1.0, 0.0, 0.9); Set_Viewport_World(-1.0, 1.0, -0.9, 1.1); Set_Pen_Color(Green); Modified: trunk/examples/ada/xthick15a.adb.cmake =================================================================== --- trunk/examples/ada/xthick15a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick15a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -94,7 +94,7 @@ sh_width : Integer; min_color, min_width, max_color, max_width : Integer; begin - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); Set_Viewport_Normalized(0.1, 0.9, 0.1, 0.9); Set_Viewport_World(-1.0, 1.0, -1.0, 1.0); @@ -158,7 +158,7 @@ sh_width := 2; - Advance_To_Subpage(0); + Advance_To_Subpage(Next_Subpage); Set_Viewport_Normalized(0.1, 0.9, 0.1, 0.9); Set_Viewport_World(-1.0, 1.0, -1.0, 1.0); Modified: trunk/examples/ada/xthick16a.adb.cmake =================================================================== --- trunk/examples/ada/xthick16a.adb.cmake 2009-01-06 07:53:33 UTC (rev 9259) +++ trunk/examples/ada/xthick16a.adb.cmake 2009-01-06 08:24:22 UTC (rev 9260) @@ -244,7 +244,7 @@ -- the input parser which handling is not implemented in this Ada example. -- exclude := True; -- if exclude then --- Advance_To_Subpage(0); +-- Advance_To_Subpage(Next_Subpage); -- Set_Viewport_Normalized(0.1, 0.9, 0.1, 0.9); -- Set_Viewport_World(-1.0, 1.0, -1.0, 1.0); -- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |