|
Fortran computed GOTO comes pretty close . . . 11 CONTROL STATEMENTS[^]
There - that'll flush out the zealots.
Treading on the toes of giants . . .
|
|
|
|
|
Put the values in a Hashset.
|
|
|
|
|
C++ equivalent:
bool contains(int var, std::vector<int> ints) {
for (int x :ints) if (var == x) return true;
return false;
}
...
int veryLongVarName = 12;
if (contains(veryLongVarName, { 1, 2, 3 })) {
OutputDebugString(L"Matches! Now we have fire!");
}
|
|
|
|
|
{
int localVLVYMN = thatVeryLongVariableYourMateNamed;
} As a single block, so that your temp-int is limited in scope. Also spitting on the hungarian notation - I would not tough that code with a polearm
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
For extra C#7 goodness:
{
ref int localVLVYMN = ref thatVeryLongVariableYourMateNamed;
...
}
Now any changes to your alias will be reflected in the original.
An added benefit for large struct s: you avoid making a copy of the value.
Ref return values and ref locals (C# Guide) | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: Now any changes to your alias will be reflected in the original. More ways to obfuscate my code
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
More job security.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Can't argue with that
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Wasn't the old visual basic capable to use WITH?
|
|
|
|
|
You remember the syntax?
Full Reset
|
|
|
|
|
In Python you can use range().
So, for [0,1,2] you would do either;
if nThatVeryLongVariableYourMateNamed not in [0,1,2]:
or
if nThatVeryLongVariableYourMateNamed not in range(3):
or
if nThatVeryLongVariableYourMateNamed not in range(0,3):
or
if nThatVeryLongVariableYourMateNamed not in range(0,3,1):
|
|
|
|
|
Cool
Full Reset
|
|
|
|
|
Why else, if you miss paying your bill, do they send you
Payment overdue - reminder notice ?
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
You are just seeing things. If it were 'Payment reminder - overdue notice'...
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Be glad it isn't:
Persona non Grata - ready for termination
|
|
|
|
|
Sip slowly, my girl - you must look after the kids.(9)
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
I see where you are going, but ... no.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
NurseMaid?
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
You are up Monday!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Are you kidding me? It was just on the fly. I assumed 4 hours was over.
Slip slowly - Nurse was obvious and so first letter 9 words came to me was nursemaid
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
No joke: I posted it 4 hours 17 mins ago, you posted the solution 23 minutes ago.
Well in time!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Anyone up for some best of posts?
How about we start with the best of TOS: for me that would be "Tomorrow is Yesterday".
Next!
Keep your friends close. Keep Kill your enemies closer.
The End
|
|
|
|
|
Nooooo, "best of" is the crap broadcast TV stations use to fill up holiday seasons when there's no new material, and for real killer they love doing a "best of <some-sh*t-reality-tv-show>."
If you're really into that sort of stuff go and watch Ghandi again again again, and tell us if you feel better, and if that doesn't convince you have a go at Survivor Season 1, or for cute whichever Kids vs Chefs program rocked your boat.
Anyway, "best of" is always contentious, if ya really gotta do it I suggest the soapbox.
|
|
|
|
|
lopati: roaming wrote: Ghandi
You mean Gandhi?
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|