|
godfetish wrote: BEGIN just doesn't look right at the end of the line! I really love 'It just ain't done!' arguments!
BEGIN is perfectly fine at the end of the line. In my Pascal days, that was the established standard. Note that Pascal switch statements - CASE value OF - uses the OF keyword to start the case list. I never saw anyone put OF on a separate line. It is matched by an END, just like BEGIN. So why would there be a difference between BEGIN ... END and CASE OF ... END? Or would you write Pascal code as
CASE i
OF
0 : Write('zero');
1 : Write('one');
2 : Write('two');
3,4,5,6,7,8,9,10: Write('?')
END; Note that if you put BEGIN and OF at separate lines, they are still at the end of the line
|
|
|
|
|
The compiler doesn't care. Neither do I.
|
|
|
|
|
You're not writing for the compiler.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I usually do. The compiler is only one who really cares, and analyzes my writings thoroughly!
|
|
|
|
|
Well, the compiler doesn't care if you use hungarian notation, but this is how office wars start.
There is only one Vera Farmiga and Salma Hayek is her prophet!
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
First, always. The single "{" hanging in the air - taken to the extreme becomes:
if (...)
{
..
}
else
{
..
}
versus
if () {
..
} else {
..
}
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
The first style is usually called "K&R", while the second is often named Allman. There are countless variations based on indentation of the following code body. I started out using K&R when I learned 'C' from, er, the K&R. When I learned C# where the convention leans hard toward Allman, I found I preferred Allman braces.
I have significant visual problems: myopia, astigmatism, presbyopia, and glaucoma in the left eye, and the right one is made of plastic. Did I mention the cataract forming in the left eye?
Allman adds white-space and highlights braces, both of which improve readability greatly for me.
One good thing about venerable VS2008 still being an active tool in our shop is that I have a Visual Studio editor macro that converts K&R style to Allman. I don't like the reformatters in later editions of Visual Studio.
Software Zen: delete this;
|
|
|
|
|
I'm totally K&R, but I upvoted this anyway just because you're cool. #no_shame
Jeremy Falcon
|
|
|
|
|
Thanks Jeremy. Glad to see you coming around here again!
Software Zen: delete this;
|
|
|
|
|
I generally prefer the latter but it depends ... = [](){ return on my mood + on the number of enclosed statements + on the kind of those statements e.g. for some reason I like lambda 's all in one line + on the complexity of those statements + on whatever surprises the automatic formatting of IDEA has in store for me; }();
|
|
|
|
|
This is the only correct way:
void AFunc() {
}
Embrace it. Join the dark side.
Jeremy Falcon
|
|
|
|
|
Not what's usually done on leaving (9)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Departing ?
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Nope!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Departure ?
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
You are up tomorrow!
Sorry about rejecting "DEPARTING", but it didn't quite fit the first part of the clue.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
No worries I thought it was one or the other - I just chose the wrong one first.
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Explanation, please?
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
Not what's usually done DEPARTURE - as in "departure from our usual procedures".
on leaving DEPARTURE - as in "use the departure terminal on leaving the country"
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Thank you
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
You're welcome!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 541 4/6
⬛🟨🟨⬛⬛
⬛⬛⬛🟨🟨
⬛🟨⬛🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 541 4/6
🟩⬜⬜⬜⬜
🟩⬜⬜⬜⬜
🟩🟨⬜⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 541 4/6
⬛⬛🟨⬛⬛
🟨🟨⬛⬛🟩
🟩⬛🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 541 4/6
⬜🟨⬜⬜⬜
⬜🟨⬜⬜⬜
🟩⬜⬜⬜🟨
🟩🟩🟩🟩🟩
|
|
|
|