Dim D Dim V Dim Y Dim i Dim P Dim L Dim E Dim A Dim S Dim EE 'Hey Kate, if you're reading this, then uhh, idk, enjoy the nightmare of VBS, and check out the other ways your options could've lead you 'Yes, I was this bored this morning, suggest you check out the full code though, trust me :) msgbox "Just before you continue, just know this is all for fun, I was bored. Open up the file in notepad or something afterwards :)", 4096 msgbox "There is also one much more disturbed I wrote if ya wanna have a laugh at that one afterwards, but this one was a more fun to code", 4096 D = msgbox ("Hey Kate, are you having a good Tuesday?", 4 +4096, ":)") if D = 6 then msgbox "That's good! I've just got another question for you", 4096, ";)" V = msgbox ("Do you have a Valentine yet?", 4 +4096, "Do you?") if V = 7 then Y = msgbox ("Would you like one?", 4 +4096, ":)") if Y = 6 then i = msgbox ("Just to be clear, you know I'm suggesting me right?", 4 +4096, "?") if i = 6 then msgbox "YAY! Just send me a picture of this :)", 4096 else P = msgbox ("Pleeeease", 4 +4096, ":)") if P = 6 then msgbox "YAY! Just send me a picture of this :)", 4096 else L = msgbox ("Pleaase, I'll do the closest equivalent of long distance spoiling you", 4 +4096, ";D") if L = 6 then msgbox "***** yea!, Just send me a picture of this", 4096 else E = msgbox ("The question is, can I break you... I learned to code for stuff like this, this could go on forever", 4 +4096, "Try close the window") if E = 6 then msgbox "Haha, I did get through to you. don't worry, only token valentines :), just send me a picture of this", 4096 else A = msgbox ("Okay, it won't go on forever, I am getting bored, sooo, will you?", 4 +4096, "After this open it in a text reader") if A = 6 then msgbox "Haha, got to you, first drink tonight is on me I guess, idk, this is tokenism (send me a picture of this)", 4096 else S = msgbox ("Okay, now I'm just trying to use all the questions I commited to coding, so please?", 4 +4096, ":)") if S = 6 then msgbox "I'm glad you ended up saying yes, even this far in somehow, woo, token valentines (send me a picture of this)", 4096 else EE= msgbox ("About this, I am of course just kidding, well, sort of, just going for tokenism, and coding practice, soo, one more time, will you?", 4 +4096, "All in good fun") if EE= 6 then msgbox "You don't actually have to, this was just a fun way to spend my morning, but thanks :) (send me a picture of this)", 4096 else msgbox "Okay, I'm finally through all my questions, this was all in good fun, have a good one :) (send me a picture of this)", 4096 End if End if End if End if End if End if End if else msgbox "Really? sounds a bit boring, but come back and re-do this if you change your mind :)", 4096 End if else msgbox "Congrats! Have a fun night, try not to get alcohol poisoning :D", 4096 End if else msgbox "Awhh, that sucks, can I try make it better?", 4096, ":(" V = msgbox ("Do you have a Valentine yet?", 4 +4096, "Do you?") if V = 7 then Y = msgbox ("Would you like one?", 4 +4096, ":)") if Y = 6 then i = msgbox ("Just to be clear, you know I'm suggesting me right?", 4 +4096, "?") if i = 6 then msgbox "YAY! Just send me a picture of this :)", 4096 else P = msgbox ("Pleeeease", 4 +4096, ":)") if P = 6 then msgbox "YAY! Just send me a picture of this :)", 4096 else L = msgbox ("Pleaase, I'll do the closest equivalent of long distance spoiling you", 4 +4096, ";D") if L = 6 then msgbox "***** yea!, Just send me a picture of this", 4096 else E = msgbox ("The question is, can I break you... I learned to code for stuff like this, this could go on forever", 4 +4096, "Try close the window") if E = 6 then msgbox "Haha, I did get through to you. don't worry, only token valentines :), just send me a picture of this", 4096 else A = msgbox ("Okay, it won't go on forever, I am getting bored, sooo, will you?", 4 +4096, "After this open it in a text reader") if A = 6 then msgbox "Haha, got to you, first drink tonight is on me I guess, idk, this is tokenism (send me a picture of this)", 4096 else S = msgbox ("Okay, now I'm just trying to use all the questions I commited to coding, so please?", 4 +4096, ":)") if S = 6 then msgbox "I'm glad you ended up saying yes, even this far in somehow, woo, token valentines (send me a picture of this)", 4096 else EE= msgbox ("About this, I am of course just kidding, well, sort of, just going for tokenism, and coding practice, soo, one more time, will you?", 4 +4096, "All in good fun") if EE= 6 then msgbox "You don't actually have to, this was just a fun way to spend my morning, but thanks :) (send me a picture of this)", 4096 else msgbox "Okay, I'm finally through all my questions, this was all in good fun, have a good one :) (send me a picture of this)", 4096 End if End if End if End if End if End if End if else msgbox "Really? sounds a bit boring, but come back and re-do this if you change your mind :)", 4096 End if else msgbox "Congrats! Have a fun night, try not to get alcohol poisoning :D", 4096 End if End if 'And if you're still reading this, know I am sort of half kidding, I do really like you, well, did, idk. I think we're better as friends than we would be otherwise. Love ya plantonically :)
Write, Run & Share VB.net code online using OneCompiler's VB.net online compiler for free. It's one of the robust, feature-rich online compilers for VB.net language, running on the latest version 16. Getting started with the OneCompiler's VB.net compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as VB.net
. OneCompiler also has reference programs, where you can look for the sample code to get started with.
OneCompiler's VB.net online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample VB.net program which takes name as input and prints hello message with your name.
Public Module Program
Public Sub Main(args() As string)
Dim name as String = Console.ReadLine() ' Reading input from STDIN
Console.WriteLine("Hello " & name) ' Writing output to STDOUT
End Sub
End Module
Visual Basic is a event driven programming language by Microsoft, first released in the year 1991.
Variable is a name given to the storage area in order to identify them in our programs.
Simple syntax of Variable declaration is as follows
Dim variableName [ As [ New ] dataType ] [ = initializer ]
variableName = value
If condition-expression Then
'code
End If
If(conditional-expression)Then
'code if the conditional-expression is true
Else
'code if the conditional-expression is false
End If
If(conditional-expression)Then
'code if the above conditional-expression is true
Else If(conditional-expression) Then
'code if the above conditional-expression is true
Else
'code if the above conditional-expression is false
End If
If(conditional-expression)Then
'code if the above conditional-expression is true
If(conditional-expression)Then
'code if the above conditional-expression is true
End If
End If
Select [ Case ] expression
[ Case expressionlist
'code ]
[ Case Else
'code ]
End Select
For counter [ As datatype ] = begin To end [ Step step ]
'code
[ Continue For ]
'code
[ Exit For ]
'code
Next [ counter ]
For Each element [ As datatype ] In group
'code
[ Continue For ]
'code
[ Exit For ]
'code
Next [ element ]
While conditional-expression
'Code
[ Continue While ]
'Code
[ Exit While ]
'Code
End While
Do { While | Until } conditional-expression
'Code
[ Continue Do ]
'Code
[ Exit Do ]
'Code
Loop
Do
'Code
[ Continue Do ]
'Code
[ Exit Do ]
'Code
Loop { While | Until } conditional-expression
Procedure is a sub-routine which contains set of statements. Usually Procedures are written when multiple calls are required to same set of statements which increases re-usuability and modularity.
Procedures are of two types.
Functions return a value when they are called.
[accessModifiers] Function functionName [(parameterList)] As returnType
'code
End Function
Sub-procedures are similar to functions but they don't return any value.
Sub ProcedureName (parameterList)
'Code
End Sub