Declares and allocates storage space for one or more variables.
i.e. Dim A1() As Integer = {0, 1, 2, 3}
difference between command and statement
While--wend statement is used to execute a loop until a given condition is true.if the condition is false the loop ends and the program continous to the line following eend.
Dim aInt as Integer = 5 Dim aStr As String = String.Empty aStr = System.Convert.ToString(aInt)
Dim average as doubleDim numberA as integer = 23Dim numberB as integer =2Dim numberC as integer = 27 'continue until you have enough numbersaverage = numberA + numberB + numberC '...average = average / 3 ' replace 3 with the amount of numbers used.
dim obj as object obj = new object();
Dim x as integer = 7
dim value1 as integer dim value2[3] as integer
dim a input a
um what do u think i mean its DIM x oh yh maybe ur dim so u don't get it yh that's right.
declaration of variable is dim a as integer
difference between command and statement
Dim i as double = CDbl("12")
dim a as integer dim b as integer dim c as integer dim d as integer private sub command1_click () a=-1 b=1 d=1 while (d<=10) c=a+b print c a=b b=c next d end sub
Dim intNumber As Integer
in BASIC, GOSUB and the RETURN statement allows the use of subrouteens.
Like most languages Visual basic also uses the 'If' keyword to implement the decision control statement. The syntax of 'If' statement is as follow If <condition> Then Statements ........... ............................. End If For Example: Private Sub Form1_click() Dim marks As Integer marks= InputBox("Enter Marks : ") If marks >60 Then MsgBox "First Devision" End If End Sub
DIM stands for declaration in memory. the words DIM is used to declare a variable. Yes Correct, I used to declare variable. I think it means Dimension, Dimension Of the memory location The original Basic language did not require or have a type definition. All variables were numeric with no distinction between integer and real/float. Assigning space for a variable was easy, they were all the same type and size. Some Basic implementations, using variable name modification, later added character variables by a dollar sign appended (varname$) and an integer type with a percent sign (varname%) leaving the unsuffixed version as it originally was. You were allowed to have all three versions of a name in play at the same time so Basic still had no type declarations. For an array, you needed to tell Basic how much space to allocate for the array. Some of the more used languages at that time (e.g. fortran) used a"Dimension" keyword for this and Basic similarly used a shorter DIM statement. Being that the designers of VB were implementing a version of Basic and they did need a type declaration, I would guess they decided to use the closest thing available: A DIM statement.