jnrsblog.blogg.se

Visual basic programming tutorial
Visual basic programming tutorial






visual basic programming tutorial

The command "Output = MyString like MyPattern" will return a "true" value to Output if MyString adheres to the pattern defined by MyPattern. "Like" compares a string against a pattern. The command "Output = YesNoA eqv YesNoB" will set the variable Output "true" if both YesNoA and YesNoB are true.

visual basic programming tutorial

"Eqv" performs a comparison against two logical variables. Other Visual Basic commands categorized as operators: Comparative operators such as "and" and "or" are also used the same as you'd see them in other languages. Mathematical symbols such as "+", "-", "/" and "*" serve their usual purpose. "Public" defines a variable that can be used externally (i.e., by procedures other than the one in which it is created).īasic math functionality falls under the "operators" category. (I.e., it does not lose its value every time the particular procedure is ended.) "Static" is similar to what might be called a "global" in other languages a "static" variable does not lose its assigned value until the entire program has been terminated. Examples: "dim MyString as string" or "n = dim n as integer."

visual basic programming tutorial

"Dim" (and "As") is used to declare a variable. Declarations can be a stumbling point for Visual Basic beginners because much of the syntax used is unique to Visual Basic. Programming languages use commands called "declarations" to define and populate variables.








Visual basic programming tutorial