Jump to content

WordBASIC: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Tags: Manual revert Mobile edit Mobile web edit
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Infobox programming language
{{Infobox programming language
| year = 1989
| year = {{Start date and age|1989}}
| developer = [[Microsoft]]
| developer = [[Microsoft]]
| influenced_by = [[QuickBASIC]]
| influenced_by = [[QuickBASIC]]
Line 7: Line 7:
| wikibooks =
| wikibooks =
}}
}}
'''WordBASIC''' was a subset of [[Microsoft]] [[QuickBASIC]] customized for word-processing. It was replaced by [[Visual Basic for Applications| Visual Basic for Applications (VBA)]] when [[Microsoft Office 97|Word 97]] was released. Contrarily to VBA, WordBasic was not [[object-oriented]] but consisted of a flat list of approximately 900 commands.<ref>[https://msdn.microsoft.com/en-us/library/office/aa211963%28v=office.11%29.aspx Conceptual Differences Between WordBasic and Visual Basic], 07/11/2006, Microsoft Docs [https://web.archive.org/web/20181201005818/https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa211963(v=office.11) Archived]</ref>
'''WordBASIC''' was a subset of [[Microsoft]] [[QuickBASIC]] customized for word-processing in [[Microsoft Word]]. It was replaced by [[Visual Basic for Applications| Visual Basic for Applications (VBA)]] when [[Microsoft Office 97|Word 97]] was released. Contrarily to VBA, WordBasic was not [[object-oriented]] but consisted of a flat list of approximately 900 commands.<ref>[https://msdn.microsoft.com/en-us/library/office/aa211963%28v=office.11%29.aspx Conceptual Differences Between WordBasic and Visual Basic], 07/11/2006, Microsoft Docs [https://web.archive.org/web/20181201005818/https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa211963(v=office.11) Archived]</ref>


==Example code==
==Example code==
Line 13: Line 13:


WordBasic:
WordBasic:
<syntaxhighlight lang="vb" highlight="3">
<syntaxhighlight lang="vbscript">
Sub MAIN
Sub MAIN
FormatFont .Name = "Arial", .Points = 10
FormatFont .Name = "Arial", .Points = 10
Insert "Hello, World!"
Insert "Hello, World!"
End Sub
End Sub
</syntaxhighlight>
</syntaxhighlight>


VBA:
VBA:
<syntaxhighlight lang="vb" highlight="3">
<syntaxhighlight lang="vbscript">
Public Sub Main()
Public Sub Main()
With Selection.Font
With Selection.Font
Line 35: Line 35:


{{BASIC}}
{{BASIC}}
{{Authority control}}


[[Category:BASIC programming language family]]
[[Category:BASIC programming language family]]

Latest revision as of 23:45, 23 May 2024

WordBASIC
DeveloperMicrosoft
First appeared1989; 35 years ago (1989)
OSMicrosoft Windows, Mac OS X
LicenseCommercial proprietary software
Influenced by
QuickBASIC

WordBASIC was a subset of Microsoft QuickBASIC customized for word-processing in Microsoft Word. It was replaced by Visual Basic for Applications (VBA) when Word 97 was released. Contrarily to VBA, WordBasic was not object-oriented but consisted of a flat list of approximately 900 commands.[1]

Example code

[edit]

The following code snippets show the difference between WordBasic and VBA with a "Hello, World!" example:[2]

WordBasic:

Sub MAIN
  FormatFont .Name = "Arial", .Points = 10
  Insert "Hello, World!"
End Sub

VBA:

Public Sub Main()
    With Selection.Font
        .Name = "Arial"
        .Size = 10
    End With
    Selection.TypeText Text:="Hello, World!"
End Sub

References

[edit]