• Welcome to Valhalla Legends Archive.
 

VBScript

Started by Mangix, March 13, 2005, 11:45 PM

Previous topic - Next topic

MyndFyre

Quote from: Mangix on March 22, 2005, 03:03 AM
i am an expert Stealthbot VBScript. Recognize Bitch. anyways thx. ima find some Javascript tutorial and work with that.

oh and the reason i dont know HTML VBScript is cause i dunno any of its functions. for stealthbot i know about all of them.

He's such an expert that he's been put on moderator review @ stealthbot.net because of his idiotic posts.

Quote from: Mangix on March 23, 2005, 05:00 PM
ummmmmmmm no. quasi = WRONG. if the If statement is one line only, there is no need for End If. ask JoeTheOdd if you dont believe me. also i know i didnt end the function. i was in a hurry at the time.
No, that's incorrect.  Visual Basic requires an End If statement because it doesn't know the difference between a one-line and multi-line "If" block because it has no cue for a start of the block, as C-based languages do.  Consider the following two snippets of code:


' code snippet 1
If user = Nothing Then
    nullUsers = nullUsers + 1
End If

MsgBox "Number of null users: " & nullUsers

'code snippet 2
If user = Nothing Then
  nullUsers = nullUsers + 1
MsgBox "Number of null users: " & nullUsers


The first would compile (or execute).  The second would not.  Why?  The second doesn't know if the MsgBox statement belongs to the If user = Nothing clause block or not.  If it does, then there should be an End If according to your logic.  If it does not belong, then they work correctly.  But in the former case, where does the End If statement go?  Does it go before MsgBox, which would make the code snippets behave the same?  Or does it go *after* MsgBox, which would make the code snippets behave differently (the message box would only display if user = Nothing in the second snippet).

This is different than C-based languages.  Consider this:

// snippet 1
if (user == NULL)
  nullUsers ++;
cout << "Number of null users: " << nullUsers << std::endl;

// snippet 2
if (user == NULL)
{
  nullUsers ++;
  cout << "Number of null users: " << nullUsers << std::endl;
}

The opening bracket gives the compiler the clue that it needs to determine if the if statement is a single-statement or multi-statement block.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Newby

Quote from: MyndFyre on March 23, 2005, 08:01 PM
Quote from: Mangix on March 23, 2005, 05:00 PM
ummmmmmmm no. quasi = WRONG. if the If statement is one line only, there is no need for End If. ask JoeTheOdd if you dont believe me. also i know i didnt end the function. i was in a hurry at the time.
No, that's incorrect.  Visual Basic requires an End If statement because it doesn't know the difference between a one-line and multi-line "If" block because it has no cue for a start of the block, as C-based languages do.  Consider the following two snippets of code:


' code snippet 1
[...]
If user = Nothing Then
  nullUsers = nullUsers + 1
[...]


Actually, one-line "If" statements can all be on one line. At least they could last time I checked.

See the following:


If user = Nothing Then nullUsers = nullUsers + 1
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

Adron

Quote from: MyndFyre on March 23, 2005, 08:01 PM
No, that's incorrect.  Visual Basic requires an End If statement because it doesn't know the difference between a one-line and multi-line "If" block because it has no cue for a start of the block, as C-based languages do.

As others have said, Visual Basic supports one-line "If" statements just fine. What you may also want to know is that Visual Basic is even more powerful than C++:  You can have multiple statements in a one-line "If"!


'code snippet 3
If user = Nothing Then nullUsers = nullUsers + 1
MsgBox "Number of null users: " & nullUsers


and then:


'code snippet 4
If user = Nothing Then nullUsers = nullUsers + 1: MsgBox "Found another null user!"
MsgBox "Number of null users: " & nullUsers




MyndFyre

Oh LoL -- here it never occurred to me that you can just avoid a line break.  :P
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Blaze

Can you do single line if statements in vb.net?

@Mangix: Your such a pro you ask others about the basics of the language your an expert at. Bravo.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Mangix

Quote from: MyndFyre on March 23, 2005, 08:01 PM
He's such an expert that he's been put on moderator review @ stealthbot.net because of his idiotic posts.
No. its because you are an abusive mod. all i did was ask FrOzeN to use the JavaScript console so he could see if any errors occured. because of that, you warned me and put me on mod review. also im your PM you said that i cant post for 4 days. 4 days have passed. And most of them are because of that Nigga Imhotep. he placed 4 warns on me for posting in the same topic. and the others because i started posting stupid shit in technical support(which i dont do now).

Adron

Quote from: Mangix on March 24, 2005, 08:24 PM
Quote from: MyndFyre on March 23, 2005, 08:01 PM
He's such an expert that he's been put on moderator review @ stealthbot.net because of his idiotic posts.
No. its because you are an abusive mod. all i did was ask FrOzeN to use the JavaScript console so he could see if any errors occured. because of that, you warned me and put me on mod review. also im your PM you said that i cant post for 4 days. 4 days have passed. And most of them are because of that Nigga Imhotep. he placed 4 warns on me for posting in the same topic. and the others because i started posting stupid shit in technical support(which i dont do now).

*places warning onto Mangix*

Mangix

i cant see my warns. where are they?

Newby

Right above your post.
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

Mangix

i cant see it. gimme a hint :P.

Banana fanna fo fanna


MyndFyre

Quote from: Mangix on March 24, 2005, 08:24 PM
Quote from: MyndFyre on March 23, 2005, 08:01 PM
He's such an expert that he's been put on moderator review @ stealthbot.net because of his idiotic posts.
No. its because you are an abusive mod. all i did was ask FrOzeN to use the JavaScript console so he could see if any errors occured. because of that, you warned me and put me on mod review. also im your PM you said that i cant post for 4 days. 4 days have passed. And most of them are because of that Nigga Imhotep. he placed 4 warns on me for posting in the same topic. and the others because i started posting stupid shit in technical support(which i dont do now).

Well maybe you should stop posting idiotic things?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Mangix

believe me i have. read my new posts :P.

quasi-modo

Quote from: Mangix on March 23, 2005, 05:00 PM
if the If statement is one line only, there is no need for End If
I remember now... it has just been so long since I have been sloppy and put all my code on one line. I usually have my code on several lines, indent, and even comment my code  ::)
WAR EAGLE!
Quote(00:04:08) zdv17: yeah i quit doing that stuff cause it jacked up the power bill too much
(00:04:19) nick is a turtle: Right now im not paying the power bill though
(00:04:33) nick is a turtle: if i had to pay the electric bill
(00:04:47) nick is a turtle: id hibernate when i go to class
(00:04:57) nick is a turtle: or at least when i go to sleep
(00:08:50) zdv17: hibernating in class is cool.. esp. when you leave a drool puddle

Mangix

Quote from: Blaze on March 23, 2005, 10:43 PM
Can you do single line if statements in vb.net?

@Mangix: Your such a pro you ask others about the basics of the language your an expert at. Bravo.
gimme all the functions of HTML and ill do it. i only know the functions for Stealthbot.

|