Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Uniform Volume Distribution ? Optimization
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

game_maker
Knave

Saudi Arabia
83 Posts

Posted - Jun 14 2004 :  12:17:49 AM  Show Profile  Visit game_maker's Homepage  Reply with Quote
nice ,,,you can test that in c or java by assigning

if (a=5) mean assigning (not comparing)

if(a==5) here it's comparing

soo in C for example

  
void main (void)  
{  
int a = 1;  
  
if (0 && (a=2)) a=3;  
  
cout << a << '\n' ;  
}  
  


OutPut is 1 so it's skips as you told me

we can't apply this test for vb becouse = will be taken as comparing ,,, and we can't use a sub (it must be a real condition or a function)

  
Dim Y As Long
Private Sub Form_Load()  
If False And X Then MsgBox "Mission Impossible"  
MsgBox IIf(Y = 0, "It's Skipps", "Please No!")  
End Sub
Private Function X() As Boolean
Y = 1  
End Function
  


the result is "Please No!"

Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.