<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: public/private question in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976673#M25147</link>
    <description>Not quite like that.  Fortran doesn't allow you to make some components public and some private.  It's all or nothing - to make all the  components private, put the PRIVATE keyword all by itself following the TYPE statement.  You can't even have a type containing some public components and then a component of a private derived type - the standard requires in such cases that the outer type be privaye as well.&lt;BR /&gt;&lt;BR /&gt;The way you'd probably have to do this is with functions in the module to set and get the VAL field.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
    <pubDate>Tue, 11 Dec 2001 10:26:52 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2001-12-11T10:26:52Z</dc:date>
    <item>
      <title>public/private question</title>
      <link>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976672#M25146</link>
      <description>I learned all oop in java whereby I have lot of occasion to be confused by similarly named constructs in cvf. &lt;BR /&gt;  &lt;BR /&gt;According to the docs I should be able to declare separte items within a type as public or private but no permutation of these keywords seems to satisfy the compiler. (In this case I am trying to write a class like that of Vectors of Java.) I do not want the user to have direct access to the properties or scratch pads.  &lt;BR /&gt; &lt;PRE&gt;&lt;FONT size="+0"&gt; 
	type Real4AutoArray  
		public,real(4),allocatable:: val(:)   
		private,real(4),allocatable:: vcopy(:)  
		private,integer,private:: currSize,incrSize  
	end type Real4AutoArray  
  
...methods like getcurrSize  
&lt;/FONT&gt;&lt;/PRE&gt;  &lt;BR /&gt;Is there a way to declare these public and private attributes?  &lt;BR /&gt;  &lt;BR /&gt;Thanks, Tim</description>
      <pubDate>Tue, 11 Dec 2001 05:02:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976672#M25146</guid>
      <dc:creator>rahzan</dc:creator>
      <dc:date>2001-12-11T05:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: public/private question</title>
      <link>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976673#M25147</link>
      <description>Not quite like that.  Fortran doesn't allow you to make some components public and some private.  It's all or nothing - to make all the  components private, put the PRIVATE keyword all by itself following the TYPE statement.  You can't even have a type containing some public components and then a component of a private derived type - the standard requires in such cases that the outer type be privaye as well.&lt;BR /&gt;&lt;BR /&gt;The way you'd probably have to do this is with functions in the module to set and get the VAL field.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Tue, 11 Dec 2001 10:26:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976673#M25147</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-12-11T10:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: public/private question</title>
      <link>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976674#M25148</link>
      <description>Thanks,  &lt;BR /&gt;I'm not sure if I understand your second statement. but before I ask about that I wonder: &lt;BR /&gt;1. what is the use of an (all private) derived type if none of its components are available?? &lt;BR /&gt;2. Did you mean something like this is not possible either? &lt;BR /&gt;     type X &lt;BR /&gt;      private &lt;BR /&gt;       real A &lt;BR /&gt;    end type X &lt;BR /&gt;    type Y &lt;BR /&gt;     type (X)  YA &lt;BR /&gt;      real  YB &lt;BR /&gt;   end type Y &lt;BR /&gt; &lt;BR /&gt;so while YA is technically public its real content in A is not. &lt;BR /&gt; &lt;BR /&gt;But you say does not work either. &lt;BR /&gt; &lt;BR /&gt;note on the side: Too bad the help files do not have URLs so we can direct each other to the a page which clear or cause a given bit of confusion such as this &lt;BR /&gt; &lt;BR /&gt;Tim</description>
      <pubDate>Wed, 12 Dec 2001 05:04:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976674#M25148</guid>
      <dc:creator>rahzan</dc:creator>
      <dc:date>2001-12-12T05:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: public/private question</title>
      <link>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976675#M25149</link>
      <description>A private type allows the user to declare objects of that type, but they must pass them as arguments to module routines to use them.&lt;BR /&gt;&lt;BR /&gt;The manuals are in HTML form at &lt;A href="http://www.compaq.com/fortran/docs"&gt;http://www.compaq.com/fortran/docs&lt;/A&gt; and you can link to indivdual pages if you like - for example &lt;A href="http://www.compaq.com/fortran/docs/lrm/lrm0038.htm#derived_def"&gt;here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 12 Dec 2001 05:30:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/public-private-question/m-p/976675#M25149</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-12-12T05:30:00Z</dc:date>
    </item>
  </channel>
</rss>

