Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6913

Re: Export vs Protect and Access

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Urs Eggmann" <Urs.Eggmann@shinternet.ch>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Export vs Protect and Access
Date Mon, 26 May 2014 22:36:36 +0200
Lines 35
Message-ID <buhmutFa1jvU1@mid.individual.net> (permalink)
References <19d01048-056a-41f7-93f6-c11362766a35@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding 7bit
X-Trace individual.net 4Ca5ml8kHHRsxVbHHz1vLgGiB4JRMH3G2GB7cDEo9RRLzmVTB4
Cancel-Lock sha1:nGx75Sq7cbnLAWd+a41ziSX3zJg=
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6157
Xref csiph.com comp.lang.clipper.visual-objects:6913

Show key headers only | View raw


Hi Chris,

As Marc wrote, with EXPORT you violate (at least a little) the principle of 
class encapsulation. With properly programmed access and assign methods you 
have a defined interface to the class variables and the possibility to do 
some checking of transferred values. I prefer Marcs method with the 
underscore.

regards
Urs

"CMc" <cmccaul@ruddwisdom.com> schrieb im Newsbeitrag 
news:19d01048-056a-41f7-93f6-c11362766a35@googlegroups.com...
> Finally making the move from 2.7b to 2.8 and am getting a lot of 
> "Access/Assign method has same name as Protected ivar" compiler errors 
> that I need to clean up.  Can someone tell me what's the difference 
> between:
>
> CLASS MyClass
> EXPORT cVar AS STRING
>
> and
>
> CLASS MyClass
> PROTECT _cVar AS STRING
>
> ACCESS cVar CLASS MyClass
> RETURN SELF:_cVar
>
> Is one more efficient, better for memory management, easier to port to 
> Vulcan?  Other than coding style, why should I use one over the other?
>
> Thanks,
> Chris 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Export vs Protect and Access CMc <cmccaul@ruddwisdom.com> - 2014-05-25 16:44 -0700
  Re: Export vs Protect and Access Farid <faridwatson@gmail.com> - 2014-05-25 20:41 -0700
    Re: Export vs Protect and Access CMc <cmccaul@ruddwisdom.com> - 2014-05-26 05:37 -0700
      Re: Export vs Protect and Access Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2014-05-26 15:51 +0200
  Re: Export vs Protect and Access D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-05-26 10:17 +0200
    Re: Export vs Protect and Access "Marc Verkade [MITCon]" <marc@mitNOSPAMconDELETE.nl> - 2014-05-26 16:45 +0200
      Re: Export vs Protect and Access D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-05-26 17:27 +0200
        Re: Export vs Protect and Access "Marc Verkade [MITCon]" <marc@mitNOSPAMconDELETE.nl> - 2014-05-28 20:47 +0200
  Re: Export vs Protect and Access Massimo Bighelli <info@arcasistemi.it> - 2014-05-26 17:29 +0200
  Re: Export vs Protect and Access "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2014-05-26 22:36 +0200
  Re: Export vs Protect and Access "Jamal" <someone@example.com> - 2014-05-27 22:09 -0400
    Re: Export vs Protect and Access Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2014-05-28 07:30 +0200
      Re: Export vs Protect and Access "Jamal" <someone@example.com> - 2014-05-28 11:13 -0400

csiph-web