Jump to content


Photo

Converting


  • Please log in to reply
No replies to this topic

#1 meadow

meadow

    Young Padawan

  • Members
  • Pip
  • 224 posts
  • Location:Devon, England
  • Interests:Php, Hockey, mysql, web design.

Posted 11 February 2006 - 03:20 AM

Ok, I've made a short php script, but it requires a lot of the computer, and times ou when I run it online, so I;m trying to turn into VB, then run it on my own computer, which I reasoned would be faster than an internet connection. But Ive hit a problem, with the if statement.

Php Code (shortened to make it simple to read):

if(($num1+$num2==1 | $num1+$num3==1 | $num1+$num4==)&&($num1+$num2==3 | $num1+$num3==9 | $num1+$num4==10)){

It continues for a while, but thats all it does, now I don't know how to do that same thing in VB, I can make an IF statement, and use the or and and operative's but when I use them together it doesn't work, here's by VB Code (Shortened):
If num1 + num2 = 1 Or _
			 num1 + num2 = 1 Or _
num5 + num4 = 1 Or _
num5 + num6 = 1 Or _
num7 + num6 = 1 Or _
num7 + num2 = 1 And num1 + num2 = 2 Or _
 num1 + num2 = 2 Or _
num5 + num4 = 2 Or _
num5 + num6 = 2 Or _
num7 + num6 = 2 Then

Any Help would be much appreciated.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users