We’ve talked about Dice’s cool ads before, but in this one, I found two syntax errors (assuming this is classic ASP and not ASP.Net — is that a fair assumption?). Anyone else see them?
[See the comments. I was totally wrong.]
I've been seeing these ads for dice.com (a job site) lately. They're pretty well-done.
I'm not an ASP programmer, nor do I call myself a programmer at all.
I see that ' Go to ... is not close '
Making the assumption that a ' will create a comment.
Also, the End If is usually EndIf in most languages, since End is typically a reserved word
If mySalary, goodSalary and suckitup() are defined, this would not generate an error. The syntax looks good to me.
-Jeff
I don't really know ASP but possible problems (assuming that there are two problems) could be: 1.If ASP does not allow parentheses inside the If statement 2.If ASP does not allow empty parentheses when calling a function/procedure that has no parameters
I give up, what are the sytax errors?
Here was my original thought.
You don't put parans around the test in an If...Then in ASP.
The "suck_it_up()" code is a problem. Since they're not assigning a return value, this is a subroutine, not a function. There's a difference in ASP. In ASP, you (inexplicably and stupidly) cannot use parans when passing arguments to a sub.
But, here's the thing. I wrote this code and executed it...and it worked. Apparently you can put parans around a test, and for some reason I can't get it to throw the "You cannot uses parantheses..." error.
I suck, totally.
Deane, admitting that you suck make you suck less :)
Dudes, if you don't know ASP, why bother trying to spot syntax errors? If you don't know the syntax...
Well, anon, it's the challenge combined with the fact that ASP isn't a complete mystery. Most of these programming languages follow certain syntax rules, even between languages. And there's a large difference between "don't know ASP" and "never saw ASP or any language remotely similar to it".
You would notice that I actually hit almost head-on the two things Deane thought of. They were both mistakes as it turned out, but the same mistakes, so I don't suck any more than he does. ;-) And the other guesses weren't particularly wild as well.