home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / maths / rlab / docs / RLFF4D~1 < prev    next >
Encoding:
Text File  |  1996-08-24  |  4.5 KB  |  146 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE> Rlab2 Reference Manual: Programmer's Interface</TITLE>
  4. </HEAD>
  5. <BODY>
  6. <A HREF="rlab-ref-8.html"><IMG SRC="prev.gif" ALT="Previous"></A>
  7. <IMG SRC="next.gif" ALT="Next">
  8. <A HREF="rlab-ref.html#toc9"><IMG SRC="toc.gif" ALT="Contents"></A>
  9. <HR>
  10. <H2><A NAME="s9">9. Programmer's Interface</A></H2>
  11.  
  12.  
  13. <P>This section provides an overview of the most likely to be used
  14. C-language functions. This list is not all inclusive.</P>
  15.  
  16.  
  17. <H2><A NAME="ss9.1">9.1 bltin_get_ent</A></H2>
  18.  
  19. <P>
  20. <DL>
  21. <DT><B> Synopsis </B><DD><P>Get an entity from a Datum.</P>
  22. <DT><B> Syntax </B><DD><P>Ent * bltin_get_ent ( Datum <EM>arg</EM>[] )</P>
  23. <DT><B> Description </B><DD><P><CODE>bltin_get_ent</CODE> returns the entity, or creates a new one if
  24. necessary, from the Datum <EM>arg</EM>. <CODE>bltin_get_ent</CODE> is most
  25. often used to extract argument entities from the argument Datum
  26. array. For example: <CODE>bltin_get_ent(args[2])</CODE> will return the
  27. argument entity associated with the third argument to the builtin
  28. function. </P>
  29.  
  30. </DL>
  31. </P>
  32.  
  33.  
  34.  
  35. <H2><A NAME="ss9.2">9.2 ent_Clean</A></H2>
  36.  
  37. <P>
  38. <DL>
  39. <DT><B> Synopsis </B><DD><P>Destroy an entity if possible.</P>
  40. <DT><B> Syntax </B><DD><P>void ent_Clean ( Ent *<EM>entity</EM> )</P>
  41. <DT><B> Description </B><DD><P>If possible, clean (destroy/free) the entity,
  42. <EM>entity</EM>. <CODE>ent_Clean</CODE> must <B>always</B> be used for this
  43. purpose, since a reference counting scheme is used to allow more
  44. than one variable point to the same entity.</P>
  45.  
  46. </DL>
  47. </P>
  48.  
  49.  
  50.  
  51. <H2><A NAME="ss9.3">9.3 class_double</A></H2>
  52.  
  53. <P>
  54. <DL>
  55. <DT><B> Synopsis </B><DD><P>Given an entity, return a double value via the
  56. class interface.</P>
  57. <DT><B> Syntax </B><DD><P>double class_double ( Ent *<EM>entity</EM> )</P>
  58. <DT><B> Description </B><DD><P><CODE>class_double</CODE> uses Rlab's class-interface to get a double
  59. value from an arbitrary <EM>entity</EM>. If the class that
  60. <EM>entity</EM> belongs to does not support this operation, an error
  61. message is generated, and program control returns to the
  62. interpreter. </P>
  63.  
  64. </DL>
  65. </P>
  66.  
  67.  
  68.  
  69. <H2><A NAME="ss9.4">9.4 class_char_pointer</A></H2>
  70.  
  71. <P>
  72. <DL>
  73. <DT><B> Synopsis </B><DD><P>Given an entity, return a character pointer via
  74. the class interface. </P>
  75. <DT><B> Syntax </B><DD><P>char * class_char_pointer ( Ent *<EM>entity</EM> )</P>
  76. <DT><B> Description </B><DD><P><CODE>class_char_pointer</CODE> uses Rlab's class-interface to get a
  77. character pointer from an arbitrary <EM>entity</EM>. If the class that
  78. <EM>entity</EM> belongs to does not support this operation, an error
  79. message is generated, and program control returns to the
  80. interpreter.</P>
  81.  
  82. </DL>
  83. </P>
  84.  
  85.  
  86.  
  87. <H2><A NAME="ss9.5">9.5 class_matrix_real</A></H2>
  88.  
  89. <P>
  90. <DL>
  91. <DT><B> Synopsis </B><DD><P>Given an entity, return a full-real-matrix via the
  92. class interface.</P>
  93. <DT><B> Syntax </B><DD><P>MDR * class_matrix_real ( Ent *<EM>entity</EM> )</P>
  94. <DT><B> Description </B><DD><P><CODE>class_matrix_real</CODE> uses Rlab's class-interface to get a
  95. pointer to a Matrix-Dense-Real (MDR) from an arbitrary
  96. <EM>entity</EM>. If the class that <EM>entity</EM> belongs to does not
  97. support this operation, an error message is generated, and program
  98. control returns to the interpreter.</P>
  99. <P>The user must <EM>not</EM> destroy, or change the matrix in any
  100. way. The returned matrix should be treated as read-only! If you must
  101. modify the matrix, use <CODE>mdr_Copy</CODE> to generate a copy of the
  102. matrix. </P>
  103.  
  104. </DL>
  105. </P>
  106.  
  107.  
  108.  
  109. <H2><A NAME="ss9.6">9.6 get_file_ds</A></H2>
  110.  
  111. <P>
  112. <DL>
  113. <DT><B> Synopsis </B><DD><P>Get a new, or existing file-descriptor.</P>
  114. <DT><B> Syntax </B><DD><P>FILE * get_file_ds ( char *<EM>name</EM>, char *<EM>mode</EM>, int <EM>buffsize</EM> )</P>
  115. <DT><B> Description </B><DD><P>Get the file-descriptor associated with the character string
  116. <EM>name</EM>. If the file-descriptor already exists (Rlab keeps track
  117. of them), then the existing descriptor is returned. Otherwise, a new
  118. file-descriptor is returned. The new file is opened with mode
  119. <EM>mode</EM>, and buffersize <EM>buffsize</EM>. If <EM>buffsize</EM> is
  120. zero, then the system's default buffersize is used.</P>
  121.  
  122. </DL>
  123. </P>
  124.  
  125.  
  126.  
  127. <H2><A NAME="ss9.7">9.7 close_file_ds</A></H2>
  128.  
  129. <P>
  130. <DL>
  131. <DT><B> Synopsis </B><DD><P>Close the named file-descriptor.</P>
  132. <DT><B> Syntax </B><DD><P>int close_file_ds ( char *<EM>name</EM> )</P>
  133. <DT><B> Description </B><DD><P>Close the file-descriptor associated with <EM>name</EM>.</P>
  134.  
  135. </DL>
  136. </P>
  137.  
  138.  
  139.  
  140. <HR>
  141. <A HREF="rlab-ref-8.html"><IMG SRC="prev.gif" ALT="Previous"></A>
  142. <IMG SRC="next.gif" ALT="Next">
  143. <A HREF="rlab-ref.html#toc9"><IMG SRC="toc.gif" ALT="Contents"></A>
  144. </BODY>
  145. </HTML>
  146.