I hear some people complain that some things which I do in my code are "against delphi standards". Specifically two things...
Assigning variables...
Begin on next line...
and also...
Is there any important things I should know why I shouldn't be doing it this way? Like is there an old version of delphi where it won't compile? Or is this just some stickler making up these standards to keep things neat and clean? Because in my opinion, the way I do it is much cleaner. I try to keep the code compacted as much as possible, while still keeping it clearly readable. Now if for example one line of code gets so long, then of course I may bring begin to the next line, but when it's a short line, why bother?
JD Solutions
Assigning variables...
Code:
//This is how I do it:
MyVar:= MyVal;
//This is how you're 'supposed' to do it:
MyVar := MyVal;
Begin on next line...
Code:
//This is how I do it:
if X > Y then begin
//This is how you're 'supposed' to do it:
if X > Y then
begin
Code:
//This is how I do it:
end else begin
//This is how you're 'supposed' to do it:
end
else
begin
Is there any important things I should know why I shouldn't be doing it this way? Like is there an old version of delphi where it won't compile? Or is this just some stickler making up these standards to keep things neat and clean? Because in my opinion, the way I do it is much cleaner. I try to keep the code compacted as much as possible, while still keeping it clearly readable. Now if for example one line of code gets so long, then of course I may bring begin to the next line, but when it's a short line, why bother?
JD Solutions