AddSuperFile.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="AddSuperFile">
  5. <title>AddSuperFile</title>
  6. <para><emphasis role="bold">STD.File.AddSuperFile<indexterm>
  7. <primary>STD.File.AddSuperFile</primary>
  8. </indexterm><indexterm>
  9. <primary>File.AddSuperFile</primary>
  10. </indexterm><indexterm>
  11. <primary>AddSuperFile</primary>
  12. </indexterm>(</emphasis> <emphasis> superfile, subfile </emphasis>
  13. <emphasis role="bold">[</emphasis> <emphasis>, atpos </emphasis> <emphasis
  14. role="bold">] [</emphasis> <emphasis>, addcontents </emphasis> <emphasis
  15. role="bold">] [</emphasis> <emphasis>,strict </emphasis> <emphasis
  16. role="bold">])</emphasis></para>
  17. <informaltable colsep="1" frame="all" rowsep="1">
  18. <tgroup cols="2">
  19. <colspec colwidth="80.50pt" />
  20. <colspec />
  21. <tbody>
  22. <row>
  23. <entry><emphasis>superfile</emphasis></entry>
  24. <entry>A null-terminated string containing the logical name of the
  25. superfile.</entry>
  26. </row>
  27. <row>
  28. <entry><emphasis>subfile</emphasis></entry>
  29. <entry>A null-terminated string containing the logical name of the
  30. sub-file. Ths may be another superfile.</entry>
  31. </row>
  32. <row>
  33. <entry><emphasis>atpos</emphasis></entry>
  34. <entry>An integer specifying the position of the
  35. <emphasis>subfile</emphasis> in the <emphasis>superfile</emphasis>.
  36. If omitted, the default is zero (0), which places the
  37. <emphasis>subfile </emphasis>at the end of the
  38. <emphasis>superfile</emphasis>.</entry>
  39. </row>
  40. <row>
  41. <entry><emphasis>addcontents</emphasis></entry>
  42. <entry>A boolean flag that, if set to TRUE, specifies the
  43. <emphasis>subfile</emphasis> is also a superfile and the contents of
  44. that superfile are added to the superfile rather than its reference.
  45. If omitted, the default is to add by reference (addcontents :=
  46. FALSE).</entry>
  47. </row>
  48. <row>
  49. <entry><emphasis>strict</emphasis></entry>
  50. <entry>A boolean flag specifying, in the case of a
  51. <emphasis>subfile</emphasis> that is itself a superfile, whether to
  52. check for the existence of the superfile<emphasis> </emphasis>and
  53. raise an error if it does not. Also, if
  54. <emphasis>addcontents</emphasis> is set to TRUE, it will ensure the
  55. <emphasis>subfile</emphasis> that is itself a superfile is not
  56. empty. If omitted, the default is false.</entry>
  57. </row>
  58. <row>
  59. <entry>Return:<emphasis> </emphasis></entry>
  60. <entry>Null.</entry>
  61. </row>
  62. </tbody>
  63. </tgroup>
  64. </informaltable>
  65. <para>The <emphasis role="bold">AddSuperFile </emphasis>function adds the
  66. <emphasis>subfile</emphasis> to the list of files comprising the
  67. <emphasis>superfile</emphasis>. All <emphasis>subfiles</emphasis> in the
  68. <emphasis>superfile</emphasis> must have exactly the same structure type and
  69. format.</para>
  70. <para>This function may be included in a superfile transaction, but is not
  71. required to be.</para>
  72. <para>Example:</para>
  73. <programlisting format="linespecific">IMPORT STD;
  74. SEQUENTIAL(
  75. STD.File.StartSuperFileTransaction(),
  76. STD.File.AddSuperFile('MySuperFile1','MySubFile1'),
  77. STD.File.AddSuperFile('MySuperFile1','MySubFile2'),
  78. STD.File.AddSuperFile('MySuperFile2','MySuperFile1'),
  79. STD.File.AddSuperFile('MySuperFile3','MySuperFile1',addcontents := true),
  80. STD.File.FinishSuperFileTransaction()
  81. );
  82. // MySuperFile1 contains { MySubFile1, MySubFile2 }
  83. // MySuperFile2 contains { MySuperFile1 }
  84. // MySuperFile3 contains { MySubFile1, MySubFile2 }
  85. </programlisting>
  86. </sect1>