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
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
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