编辑“︁
Microsoft Small Basic
”︁
跳转到导航
跳转到搜索
Template:Editnotice load/content
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
{{Infobox programming language | name = Microsoft Small Basic | logo = Microsoft Small Basic icon.png | screenshot = | caption = | paradigm = [[结构化编程|结构化]], [[指令式编程|指令式]], [[面向对象编程|面向对象]] | developer = [[Microsoft]] | released = {{Start date and age|2008|10|23}} | latest release version = v1.2 | latest release date = {{Start date and age|2015|10|1}} | influenced by = [[Logo (程序语言)|Logo]], [[QBasic]], [[Visual Basic .NET]] | File extensions = <kbd>.sb</kbd>, <kbd>.smallbasic</kbd> | operating system = [[Windows Vista]], [[Windows 7]], [[Windows 8]], [[Windows 8.1]], [[Windows 10]], [[Windows Server 2008 R2]]<ref name="v1.2 download page">{{cite web | url=https://www.microsoft.com/en-us/download/details.aspx?id=46392 | title=Download Microsoft Small Basic 1.2 from Official Microsoft Download Centre | work=Small Basic | publisher=Microsoft | date=1 October 2015 | access-date=2 October 2015 | archive-date=2021-01-28 | archive-url=https://web.archive.org/web/20210128062721/http://www.microsoft.com/en-US/download/details.aspx?id=46392 | dead-url=no }}</ref> | platform = [[.NET框架#.NET Framework 4.5|.NET Framework 4.5]] | license = [[MIT许可证]]<ref>{{Cite web |url=https://github.com/sb/smallbasic-editor/blob/master/LICENSE |title=存档副本 |access-date=2021-02-24 |archive-date=2021-07-16 |archive-url=https://web.archive.org/web/20210716122342/https://github.com/sb/smallbasic-editor/blob/master/LICENSE |dead-url=no }}</ref> | genre = [[集成开发环境]], [[教育软件]] | website = {{URL|http://www.smallbasic.com/}} | typing = [[动态类型|动态]], [[类型系统|弱类型]] | designer = [[Microsoft]], Vijaye Raji | status = Active }} '''Microsoft Small Basic'''是一個簡化過的[[BASIC]]程式語言,由Microsoft於2008年10月发布。微軟称這是對於初學者而言最容易入手的程式語言。它只有14個關鍵字<ref>{{Cite web |url=http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx |title=Microsoft Small Basic Home Page |accessdate=2011-05-13 |archive-date=2019-02-02 |archive-url=https://web.archive.org/web/20190202090251/https://msdn.microsoft.com/en-us/devlabs/cc950524.aspx |dead-url=no }}</ref>,開發環境和操作介面友善易用。從0.9版(11 June 2010)<ref>{{Cite web |url=http://blogs.msdn.com/b/smallbasic/archive/2010/06/11/small-basic-v0-9-is-here.aspx |title=存档副本 |accessdate=2011-05-13 |archive-date=2010-06-21 |archive-url=https://web.archive.org/web/20100621051321/http://blogs.msdn.com/b/smallbasic/archive/2010/06/11/small-basic-v0-9-is-here.aspx |dead-url=no }}</ref> 至今,沒有添加任何的新功能,只有操作介面被翻译成更多種的語言。 Microsoft Small Basic由Microsoft DevLabs所設計,在2008年10月以技術預覽〈Technology Preview〉方式發佈<ref>{{Cite web |url=http://msdn.microsoft.com/en-us/devlabs/cc950527.aspx |title=About DevLabs |accessdate=2011-05-13 |archive-date=2013-01-30 |archive-url=https://web.archive.org/web/20130130011735/http://msdn.microsoft.com/en-us/devlabs/cc950527.aspx |dead-url=no }}</ref>。它的目標是使任何人,无论兒童或成人,都能够开始学习程式設計。 ==程式語言== Small Basic 最初是以微軟的 [[QBasic]] 程式語言為基礎修改的,后来移植到[[.Net Framework]]。[[Hello World]] 程序代码如下: <syntaxhighlight lang="vbnet"> TextWindow.Write("Hello World") </syntaxhighlight> 或是: <syntaxhighlight lang="vbnet"> TextWindow.Writeline("Hello World") </syntaxhighlight> 其它BASIC語言是寫成<syntaxhighlight lang="vbnet" inline>print "Hello World"</syntaxhighlight>,但是這種寫法用Microsoft Small Basic完全不能執行。 ===條件分支=== <syntaxhighlight lang="vbnet"> TextWindow.Write("Enter the temperature today (in F): ") temp = TextWindow.ReadNumber() If temp > 100 Then TextWindow.WriteLine("It is pretty hot.")ElseIf temp > 70 Then TextWindow.WriteLine("It is pretty nice.")ElseIf temp > 50 Then TextWindow.WriteLine("Don't forget your coat.")Else TextWindow.WriteLine("Stay home.") EndIf </syntaxhighlight> 可以在smallbasic.com的網站上通过網頁瀏覽器執行。<ref>{{Cite web |url=http://smallbasic.com/smallbasic.com/program/?KCF215 |title=Microsoft Small Basic Program Listing:KCF215 |accessdate=2011-05-13 |archive-date=2016-03-20 |archive-url=https://web.archive.org/web/20160320192045/http://smallbasic.com/smallbasic.com/program/?kcf215 |dead-url=no }}</ref> ===For迴圈=== <syntaxhighlight lang="vbnet"> TextWindow.WriteLine("Multiplication Tables")table = 4 For i = 1 to 10 TextWindow.WriteLine(i + " x " + table + " = " + table * i) EndFor </syntaxhighlight> 可以在smallbasic.com的網站上通过網頁瀏覽器執行。<ref>{{Cite web |url=http://smallbasic.com/smallbasic.com/program/?RNG254 |title=Microsoft Small Basic Program Listing:RNG254 |accessdate=2011-05-13 |archive-date=2016-03-20 |archive-url=https://web.archive.org/web/20160320230652/http://smallbasic.com/smallbasic.com/program/?rng254 |dead-url=no }}</ref> ==Turtle== <syntaxhighlight lang="vbnet"> For i = 1 to 4 Turtle.Move (100) Turtle.TurnRight() EndFor </syntaxhighlight> 它在迴圈的結束是用<syntaxhighlight lang="vbnet" inline>EndFor</syntaxhighlight>,而不是像其它的Basic語言(例如Microsoft QuickBasic)中用的<syntaxhighlight lang="vbnet" inline>Next i</syntaxhighlight>。 ==试验== 在第一次試驗中,一些中學兒童成功地參與,其中大多數是微軟工作者的兒童。Small Basic還試驗成功對一群25名高中女生的團體進行動手實驗的方法。<ref>{{Cite web |url=http://channel9.msdn.com/posts/Charles/Expert-to-Expert-The-Basics-of-SmallBasic |title=The Basics of Small Basic |accessdate=2011-05-13 |archive-date=2010-09-13 |archive-url=https://web.archive.org/web/20100913170636/http://channel9.msdn.com/posts/Charles/Expert-to-Expert-The-Basics-of-SmallBasic/ |dead-url=no }}</ref> ==参考资料== {{reflist|2}} ==外部連結== * [http://msdn.microsoft.com/en-us/beginner/ff384126.aspx Official Site] {{Wayback|url=http://msdn.microsoft.com/en-us/beginner/ff384126.aspx |date=20130316071943 }} * [https://web.archive.org/web/20110320065512/http://computerscienceforkids.com/MicrosoftSmallBasicTutorials.aspx/ Small Basic Programming Tutorials For Kids] by Computer Science for Kids* * [http://channel9.msdn.com/posts/Charles/Expert-to-Expert-The-Basics-of-SmallBasic/ The Basics of Small Basic] {{Wayback|url=http://channel9.msdn.com/posts/Charles/Expert-to-Expert-The-Basics-of-SmallBasic/ |date=20100913170636 }} discussion with Vijaye Raji and Erik Meijer on SmallBasic* * [http://channel9.msdn.com/shows/the%20knowledge%20chamber/intro-to-small-basic-with-vijaye-raji/ Introduction to Small Basic] {{Wayback|url=http://channel9.msdn.com/shows/the%20knowledge%20chamber/intro-to-small-basic-with-vijaye-raji/ |date=20100711084516 }} discussion with Vijaye Raji and Robert Hess on SmallBasic* * [http://www.simple-talk.com/dotnet/.net-tools/microsoft-small-basic-for-.net/ Microsoft Small Basic for .NET] {{Wayback|url=http://www.simple-talk.com/dotnet/.net-tools/microsoft-small-basic-for-.net/ |date=20160413043657 }} Review of Microsoft Small Basic, with sample application * [http://rosettacode.org/wiki/Category:Microsoft_Small_Basic Category:Microsoft Small Basic] {{Wayback|url=http://rosettacode.org/wiki/Category:Microsoft_Small_Basic |date=20200804004222 }} 在[http://rosettacode.org rosettacode.org] {{Wayback|url=http://rosettacode.org/ |date=20090106202220 }}上的Microsoft Small Basic中實現了許多任務 {{程序设计语言}} {{BASIC}} [[Category:Microsoft BASIC]] [[Category:.NET编程语言]] [[Category:2008年建立的程式語言]]
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
页面
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息