princemahesh
asked on
VCL Coding style
Hi
I work in dephi occationally.
I have been ask to develop a program in delphi.
and the specification has one heading like this:
Coding style
------------
The VCL is to be used as the reference for the style of the code. Further guidelines generally accepted by the Delphi community
What does it mean to use the VCL coding style?
I work in dephi occationally.
I have been ask to develop a program in delphi.
and the specification has one heading like this:
Coding style
------------
The VCL is to be used as the reference for the style of the code. Further guidelines generally accepted by the Delphi community
What does it mean to use the VCL coding style?
Beats the hell out of me! You might want to ask for a little more info.
ASKER
Hi Stuart Johnson
I won't mind if you give me little more info.
I won't mind if you give me little more info.
Hi princemahesh
I believe stuart meant you should ask for more
information from the people who want you to
write the program :)
Coding in the vcl style? that's very ambiguous...
It could mean anything!
Perhaps how the code is formatted...?
Bold keywords, indented lines, lots of commented
lines for the benefit of others maintaining or
amending the code and economic routines instead of
lengthy other options that achieve the same result.
I'm interested what our expert colleagues make of
this 'VCL style' definition (?)
Good luck
tongalite
I believe stuart meant you should ask for more
information from the people who want you to
write the program :)
Coding in the vcl style? that's very ambiguous...
It could mean anything!
Perhaps how the code is formatted...?
Bold keywords, indented lines, lots of commented
lines for the benefit of others maintaining or
amending the code and economic routines instead of
lengthy other options that achieve the same result.
I'm interested what our expert colleagues make of
this 'VCL style' definition (?)
Good luck
tongalite
I always assumed VCL style meant stuff like the following:
- Class names start with a capital T - TStringList
- property storage variables start with F - FCount, the property name itself would be Count.
- property access functions are prefixed with Get or Set
- Events names start with On - OnClicked
- Components all have a specific prefix.
and so on...
I don't know if it is written down anywhere - I've just picked it up by looking at the VCL code.
Hope that helps
Paul
- Class names start with a capital T - TStringList
- property storage variables start with F - FCount, the property name itself would be Count.
- property access functions are prefixed with Get or Set
- Events names start with On - OnClicked
- Components all have a specific prefix.
and so on...
I don't know if it is written down anywhere - I've just picked it up by looking at the VCL code.
Hope that helps
Paul
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what/how is your style, james?
Well, like any consistent style (that I've ever heard of, anyway) it can't be summarized very well. One of these days I'm going to actually write a style guide for my style of coding.
Basically, I like consistent indentation so that it is very obvious where the nesting occurs. With the "VCL Style" it is sometimes difficult to tell exactly what occurs in each scope, espicilly when dealing with then/else statements.
Don't get me wrong, though, I've seen much worse than the "VCL" style. In particular I really dislike hungarian notation, which makes maintenance and change much more difficult. It also makes grouping associated identifiers difficult.
If you REALLY want to know what I think, look up an article on the Borland Community web site titled "Hungarian Peanut Butter" and see my comments on it.
Delphi Architect
James Higgins
Basically, I like consistent indentation so that it is very obvious where the nesting occurs. With the "VCL Style" it is sometimes difficult to tell exactly what occurs in each scope, espicilly when dealing with then/else statements.
Don't get me wrong, though, I've seen much worse than the "VCL" style. In particular I really dislike hungarian notation, which makes maintenance and change much more difficult. It also makes grouping associated identifiers difficult.
If you REALLY want to know what I think, look up an article on the Borland Community web site titled "Hungarian Peanut Butter" and see my comments on it.
Delphi Architect
James Higgins
well, had read it,
and i agree with you, james
and i agree with you, james
ASKER
Thanks DelphiArchitect
I think they are mainly refering to Delphi coding standards as placed on the borland site.
I think they are mainly refering to Delphi coding standards as placed on the borland site.