[spoiler=Visual Basic] Used for: Desktop applications and libraries Been around since: Late 1980's Pros: Easy to learn for beginners Can quickly make applications Cons: Not the best language for cross-platform applications Not commonly used anymore like Java or C++ Alternatives: If you are a person who wants to program for a living, do yourself a favor and learn something besides visual basic. If you are a hobbyist programmer, then this will be alright for you. SwiftKit is made with visual basic. (all of this is from memory so sorry if I make a mistake) A basic function
Function addNumbers(byval num1 as integer, byval num2 as integer)
Dim result as integer
result = num1+num2
return result
End Function
[hide=A basic visual basic coding tut] Variables: Variables are usually created in this format: Dim (variable name) as (variable type) Although you can use Private,public, Const, and static in some declarations. For example: Dim strData as string
Dim intAppleCount as integer
Static count
Const PRICE as string = 40 When declaring strings, you must wrap the string in quotations. Instead of declaring three variables such as: Dim intA as integer
Dim intB as integer
Dim intC as integer You can do Dim intA, intB, intC as integer
Loops: There are two types of loops: The first type is Do- While.
dim intX as integer = 10
Static count
Do While count < intX
count += 1
loop
The next type of loop is a For-Next loop. For i as integer = 1 to 10
debug.writeline(i)
next Strings Lets look at the following sentence: "The cat in the hat has 9 pizzas" lets say we want to replace that 9 with "nine". All we would have to do is:
Dim strSaying as string = "The cat in the hat has 9 pizzas"
strSaying.replace(9,"nine")
That should replace the number 9 with "nine" [/hide] I have to move some stuff in real life so I will finsih this later.