Testing the obvious....
-
Not a new horror, nonetheless something tells me this If statement may be redundant...
fileName = "" If Len(fileName) = 0 Then fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF" End If
-
Not a new horror, nonetheless something tells me this If statement may be redundant...
fileName = "" If Len(fileName) = 0 Then fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF" End If
-
Not a new horror, nonetheless something tells me this If statement may be redundant...
fileName = "" If Len(fileName) = 0 Then fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF" End If
Hmmm, tricky. Give me a few hours and I'll get back to you on that one... 8)
-
Not a new horror, nonetheless something tells me this If statement may be redundant...
fileName = "" If Len(fileName) = 0 Then fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF" End If
Well, stating the obvious, it's quite likely that, either the coder didn't want to rely on code never being inserted between the initializer and guard, or, more likely, the coder added the initializer later, probably to test the guard. Hey, you never know...
-
Not a new horror, nonetheless something tells me this If statement may be redundant...
fileName = "" If Len(fileName) = 0 Then fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF" End If
There may have been code between the initialiser and the if statement that has since been removed. It might actually be a better piece of coding than you think. You always have the option of inserting some more code between the two and it might stand a chance of still working. ;)
-
Not a new horror, nonetheless something tells me this If statement may be redundant...
fileName = "" If Len(fileName) = 0 Then fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF" End If
So the if statement is redundent... Maybe the dude has got a resentment towards some tester maybe? fileName is obviously a string which is a referenced type. If it wasn't initialized could of contained some garbage and length would of therefor been > 0. However this is not the case... It is initialised and therefor redundent.
"Program testing can be used to show the presence of bugs, but never to show their absence." << please vote!! >>
-
There may have been code between the initialiser and the if statement that has since been removed. It might actually be a better piece of coding than you think. You always have the option of inserting some more code between the two and it might stand a chance of still working. ;)
-
Not a new horror, nonetheless something tells me this If statement may be redundant...
fileName = "" If Len(fileName) = 0 Then fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF" End If
I posted an example like this in the lounge a few months ago... also found ASP code like this...
for each element in Request.form
if request.form("specificElement") <> "" then
someVar = request.form("specificElement")
...
[do some other stuff]
end if
nextIt hurts both my eyes and my brain :(
-
Not a new horror, nonetheless something tells me this If statement may be redundant...
fileName = "" If Len(fileName) = 0 Then fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF" End If
-
then the code would be incorrect even with the test for zero length
-
then the code would be incorrect even with the test for zero length
-
then the code would be incorrect even with the test for zero length
:laugh: :laugh: :laugh: :laugh: .. ...
try
{
retry:
while (filename = EmptyString)
{
if(Len(fileName) == 0)
{
fileName = Left(DBEngine.Workspaces(0).Databases(0).Name, i) & "REF"
}
}
}
catch
{
goto retry;
}
filename = "";:laugh: :laugh: :laugh: :laugh: :laugh: .... just trying to see how many people will complain about this.... ;P
I'd blame it on the Brain farts.. But let's be honest, it really is more like a Methane factory between my ears some days then it is anything else...
-----
"The conversations he was having with himself were becoming ominous."-.. On the radio...