Top 1,000 Features Creators Resources Extensions Blog Explorer CSV Download
GitHub icon

Visual Basic

< >

Visual Basic is a programming language created in 1991.

#40on PLDB 33Years Old

Try now: Riju

Visual Basic is a third-generation event-driven programming language and integrated development environment (IDE) from Microsoft for its Component Object Model (COM) programming model first released in 1991 and declared legacy during 2008. Microsoft intended Visual Basic to be relatively easy to learn and use. Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects. Read more on Wikipedia...

Example from Compiler Explorer:
Module Program Function Square(num As Integer) As Integer Return num * num End Function End Module
Example from Riju:
Module Main Sub Main(args As String()) Console.WriteLine("Hello, world!") End Sub End Module
Example from hello-world:
Module HelloWorld Sub Main() MsgBox("Hello World") End Sub End Module
Example from Wikipedia:
Option Explicit Dim Count As Integer Private Sub Form_Load() Count = 0 Timer1.Interval = 1000 ' units of milliseconds End Sub Private Sub Timer1_Timer() Count = Count + 1 Label1.Caption = Count End Sub
Visual Basic Keywords
AddHandler AddressOf Alias And AndAlso As Async Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDbl CDec Char CInt Class CLng CObj Const Continue CSByte CShort CSng CStr CType CUInt CULng CUShort Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End EndIf Enum Erase Error Event Exit False Finally For Friend Function Get GetType GetXMLNamespace Global GoSub GoTo Handles If Implements Imports In Inherits Integer Interface Is IsNot Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass NameOf Namespace Narrowing New Next Not Nothing NotInheritable NotOverridable Object Of On Operator Option Optional Or OrElse Out Overloads Overridable Overrides ParamArray Partial Private Property Protected Public RaiseEvent ReadOnly ReDim RemoveHandler Resume Return SByte Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TryCast TypeOf UInteger ULong UShort Using Variant Wend When While Widening With WithEvents WriteOnly Xor

Language features

Feature Supported Token Example
Booleans โœ“ True False
Strings โœ“ "
Case Insensitive Identifiers โœ“
Print() Debugging โœ“ Console.WriteLine
Line Comments โœ“ '
' A comment
Comments โœ“
Directives โœ“
Option Explicit On|Off
Option Compare Binary
Semantic Indentation X
MultiLine Comments X
Operator Overloading X

View source

- Build the next great programming language ยท About ยท Acknowledgements ยท Published by Breck's Lab