• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Funniest code snippet ever! Must See!

Mucman

Diamond Member
select case selectedCruiseline
case "1"
selectedCruiseline = 1
case "2"
selectedCruiseline = 2
case "3"
selectedCruiseline = 3
case "4"
selectedCruiseline = 4
case "5"
selectedCruiseline = 5
case "6"
selectedCruiseline = 6
case "7"
selectedCruiseline = 7
case "8"
selectedCruiseline = 8
case "9"
selectedCruiseline = 9
end select

Had to troubleshoot a customer whose ASP website is bringing down the server. If I hit a certain URL the
dllhost.exe process consumes all the CPU and all the RAM! Administering shared hosting feels more and more
like being a babysitter. The above code is actually used in their website!
 
pure stupidity.

I bet the person who coded that worked on Bestbuy.com. Horrible horrible experiences with the site and security.
 
mmmm.....code-bloat
rolleye.gif
 
Originally posted by: notfred
Originally posted by: gigapet
someone explain the humor

It's the equivelant of:

If this number is 1, make this number be 1.
If this number is 2, make this number be 2.
...
Up through 9...

It's worse than that, they're reassigning the value to the SAME VARIABLE.

Viper GTS
 
I've only taken elementary C++, so I might not know what I'm talking about, but do you need 'break' statments when writing a case statement also?
 
Originally posted by: Viper GTS
Originally posted by: notfred
Originally posted by: gigapet
someone explain the humor

It's the equivelant of:

If this number is 1, make this number be 1.
If this number is 2, make this number be 2.
...
Up through 9...

It's worse than that, they're reassigning the value to the SAME VARIABLE.

Viper GTS

Um, that's what I said. Unless you're differentiting between "this number" and "this number" and somehow thinking I implied two different variables... 😕
 
Originally posted by: jumpr
I've only taken elementary C++, so I might not know what I'm talking about, but do you need 'break' statments when writing a case statement also?

It's VBScript

 
Originally posted by: jumpr
I've only taken elementary C++, so I might not know what I'm talking about, but do you need 'break' statments when writing a case statement also?

It's ASP code, not C++ did you read the first post?
 
Originally posted by: notfred
Originally posted by: Viper GTS
Originally posted by: notfred
Originally posted by: gigapet
someone explain the humor

It's the equivelant of:

If this number is 1, make this number be 1.
If this number is 2, make this number be 2.
...
Up through 9...

It's worse than that, they're reassigning the value to the SAME VARIABLE.

Viper GTS

Um, that's what I said. Unless you're differentiting between "this number" and "this number" and somehow thinking I implied two different variables... 😕

My way of saying it was clearer.

😛

Viper GTS
 
Originally posted by: notfred
Originally posted by: jumpr
I've only taken elementary C++, so I might not know what I'm talking about, but do you need 'break' statments when writing a case statement also?

It's ASP code, not C++ did you read the first post?
Right, I know. But I was wondering if ASP uses break statements just like C++. So you didn't really answer my question. 😛
 
Originally posted by: jumpr
Originally posted by: notfred
Originally posted by: jumpr
I've only taken elementary C++, so I might not know what I'm talking about, but do you need 'break' statments when writing a case statement also?

It's ASP code, not C++ did you read the first post?
Right, I know. But I was wondering if ASP uses break statements just like C++. So you didn't really answer my question. 😛

Apparently not, since the code runs.
 
Originally posted by: manly
Nah, that isn't funny besides the laughing at someone elses's stupidity.

Since I don't know VB, is that actually completely redundant, or is it essentially converting a string to an integer?

It's a case statement. They're the same function in all languages that support it, only the syntax may be a little different.

 
Back
Top