This document provides a revision guide for key concepts in Visual Basic programming including variable declaration and initialization, output and input statements, conditional statements like If/Else and Select Case, looping statements such as For/To/Next and While/EndWhile, and arrays. The guide defines each concept and provides basic syntax examples to illustrate their use.
This document provides a revision guide for key concepts in Visual Basic programming including variable declaration and initialization, output and input statements, conditional statements like If/Else and Select Case, looping statements such as For/To/Next and While/EndWhile, and arrays. The guide defines each concept and provides basic syntax examples to illustrate their use.
This document provides a revision guide for key concepts in Visual Basic programming including variable declaration and initialization, output and input statements, conditional statements like If/Else and Select Case, looping statements such as For/To/Next and While/EndWhile, and arrays. The guide defines each concept and provides basic syntax examples to illustrate their use.
Dim Variable As Variable type Select Case Expression Variable Initialization: Case Value1 Variable/Constant = “Value” Statement Initialization with Declaration: Case value 2 Dim Variable As Variable type = “Value” Statement Output statement: Case value 3 Statement Console.writeline() End Select Example: Console.writeline(“What is your name?”) Looping Statements: Input Statement: For..to..Next: For Variable As datatype = Initial Value To Console.readline () Final Value Step increment or decrement Example: Statements Console.writeline(“What is your name?”) Next Name = Console.readline() While…Endwhile: While Condition Conditional Statements: Statements If… Else: Endwhile If Expression Do..Loop..Until: Then Satement Do Else statement Statements Endif Loop Until (condition) Array Dim varName( ) As Type Dim varName( ) As Type = {List} Dim strCheese( ) As String = {"Swiss", "Cheddar", "Mozzarella", "American", Parmesan"}