Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mac-Addict

macrumors 65816
Aug 30, 2006
1,423
2
London
GooMan said:
if (youNeedAMachine && timeNeeded.equals("now")) {
purchaseFromApple(machineWanted,$$$);​
}
else {
readMacRumors();​
}
beHappy();

:O! Is that Windows Visual Basics coding?! *Sprays with disinfectant*
 

richard4339

macrumors 6502a
Sep 6, 2006
891
108
Illinois
If that's Java, its badly written. You need quotes around $$$ and also need more parenthesis around your initial if statement:

if ((youNeedAMachine) && (timeNeeded.equals("now"))) {
purchaseFromApple(machineWanted, "$$$");
}
else {
readMacRumors();
}
beHappy();

Keep in mind this is assuming $$$ is a string, and not a float...
 

generik

macrumors 601
Aug 5, 2005
4,116
1
Minitrue
richard4339 said:
if ((youNeedAMachine) && (timeNeeded.equals("now"))) {

You don't need to do this since.. oh I dunno... 1.5 or something?

I never am arsed with it these days.
 

richard4339

macrumors 6502a
Sep 6, 2006
891
108
Illinois
Oops, I think I may have confused that with PHP... you do need 'em in there (I know this, because I had to research it a week ago for a friend asking me this exact question).

In college, my first semester of Java was 1.4.2, my second semester was 1.5, so it was a fun transition, when we had to stop using BufferedReader and start using Scanner, and our TA hadn't had java since 1.4, and thought all of our code was invalid.
 

stracky

macrumors member
Sep 4, 2006
40
9
i will probably update my MBP after CS3 is released, cause by mid next year im sure there will be another revision and it will be faster again, which will conicide nicely with CS3,

cause memron aint gunna make much difference to mail, safari, word, excel or web dev.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.