PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Visual Basic

Visual Basic

Visual Basic is a pl created in 1991.

#41on PLDB 31Years Old 15.9kUsers
0Books 0Papers

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

Keywords in Visual Basic

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 Example Token
Booleans True False
Strings "
Print() Debugging Console.WriteLine
Line Comments
' A comment
'
Comments
Directives
Option Explicit On|Off
Option Compare Binary
Semantic Indentation ϴ
MultiLine Comments ϴ
Operator Overloading ϴ
mathematica.html · visual-basic.html · objective-c.html

View source

PLDB - Build the next great programming language · v2022 · Day 32 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com