Mega Search
23.2 Million


Sign Up

Make a donation  
MSOL in RAD2007  
News Group: borland.public.delphi.ide.general

Hi,

This is an audit question.

I've been playing around with the auditing feature in RAD2007 and
it's a nice way to clean up my code, but there are two issues which
I am not entirely sure of.

MSOL : (Multiple statements on one line)

     var
           i, j,
              k   : integer;

   Is the above valid?  Because that's where I'm being 'informed' of a
MSOL.


MCP: (Method 'Is_Amon' can be made private)

    Here is where I'm quite flumoxed.  The class that has this method
is defined as follows:

    TBOMClass = class(TOBject)
       private
               function Is_Amon: boolean;
       public
          ..
    end;

    Clearly, Is_Amon *is* private, or have I gotten my
object declaration misunderstood?

Can someone clarify which part I'm misunderstanding?

Thanks

Edmund

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 7-Jan-2008, at 6:53 PM EST
From: Ed
 
Re: MSOL in RAD2007  
News Group: borland.public.delphi.ide.general
Peter Below (TeamB) wrote:
> 
>> MCP: (Method 'Is_Amon' can be made private)
>>
>>    Here is where I'm quite flumoxed.  The class that has this method
>> is defined as follows:
>>
>>    TBOMClass = class(TOBject)
>>       private
>>               function Is_Amon: boolean;
>>       public
>>          ..
>>    end;
>>
>>    Clearly, Is_Amon is private, or have I gotten my
>> object declaration misunderstood?
> 
> There is "private" and there is "strict private", the audit module
> seems to opt for the strict versions.

Thanks Peter for the information.   I thought private was private,
but apparently there's also a strict private?    Will have to
read up on that.

Edmund

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 8-Jan-2008, at 8:44 AM EST
From: Ed
 
Re: MSOL in RAD2007  
News Group: borland.public.delphi.ide.general
Ed wrote:

> This is an audit question.
> 
> I've been playing around with the auditing feature in RAD2007 and
> it's a nice way to clean up my code, but there are two issues which
> I am not entirely sure of.
> 
> MSOL : (Multiple statements on one line)
> 
>     var
>           i, j,
>              k   : integer;
> 
>   Is the above valid?  

Yes, it is valid. Delphi is a language where whitespace has no
significance for the syntax. The audit things are mostly a matter of
detecting deviations from a predefined coding standard, not detecting
syntax errors.

> MCP: (Method 'Is_Amon' can be made private)
> 
>    Here is where I'm quite flumoxed.  The class that has this method
> is defined as follows:
> 
>    TBOMClass = class(TOBject)
>       private
>               function Is_Amon: boolean;
>       public
>          ..
>    end;
> 
>    Clearly, Is_Amon is private, or have I gotten my
> object declaration misunderstood?

There is "private" and there is "strict private", the audit module
seems to opt for the strict versions.


-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 7-Jan-2008, at 11:57 AM EST
From: Peter Below (TeamB)