Microsoft Small Basic
Microsoft Small Basic是一個經簡化過的BASIC程式語言,於Microsoft於2008年10月發表。只需要有程式語言最基本的概念,微軟說這是對於初學者而言最容易入手的程式語言。它只有14個關鍵字[2],它的開發環境對於初學者是友善與直接的操作介面。從0.9版(11 June 2010)[3] 至今,沒有任何的新功能被添加,只有操作介面被翻译成更多種的語言。
原作者 | Microsoft DevLabs |
---|---|
開發者 | Microsoft DevLabs |
初始版本 | 2015 |
穩定版本 | 1.2 (2015年10月1日[1]) |
编程语言 | Microsoft .Net 4.5 |
操作系统 | Microsoft Windows |
系統平台 | Microsoft Windows |
类型 | Integrated development environment |
网站 | http://www.smallbasic.com/ |
Microsoft Small Basic是由Microsoft DevLabs所設計,與在2008年10月以技術預覽〈Technology Preview〉方式發佈[4]。它的目標是用於任何人開始學程式設計,包含兒童或成人。
程式語言
它最初是以微軟的QBasic程式語言做為基礎進行修改,但被移植到.Net Framework。以範例'Hello World'為例,必須寫成:
TextWindow.Write("Hello World")
或是:
TextWindow.Writeline("Hello World")
相較於其它的BASIC語言,是寫成:
print "Hello World"
但是這種寫法完全不能在Microsoft Small Basic裡執行
條件分支
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
以上列範例的Code為例,可發佈到smallbasic.com的網站上,透過網頁瀏覽器去執行[5]
For迴圈
TextWindow.WriteLine("Multiplication Tables")table = 4
For i = 1 to 10
TextWindow.WriteLine(i + " x " + table + " = " + table * i)
EndFor
以上列範例的Code為例,可發佈到smallbasic.com的網站上,透過網頁瀏覽器去執行[6]
Turtle
For i = 1 to 4
Turtle.Move (100)
Turtle.TurnRight()
EndFor
它在迴圈的結束是用
EndFor
,而不是像其它的Basic語言(例如Microsoft QuickBasic)中用的
Next i
试验
在第一次試驗中,一些中學兒童成功地參與,其中大多數是在微軟工作者的兒童。Small Basic還試驗成功對一群25名高中女生的團體進行動手實驗的方法。[7]
参考资料
- Scherotter, Michael. . Small Basic. MSDN Blogs. Microsoft. 2015-10-01 [2015-10-02]. (原始内容存档于2015-10-03).
- . [2011-05-13]. (原始内容存档于2019-02-02).
- . [2011-05-13]. (原始内容存档于2010-06-21).
- . [2011-05-13]. (原始内容存档于2013-01-30).
- . [2011-05-13]. (原始内容存档于2016-03-20).
- . [2011-05-13]. (原始内容存档于2016-03-20).
- . [2011-05-13]. (原始内容存档于2010-09-13).
外部連結
- Official Site 页面存档备份,存于
- Small Basic Programming Tutorials For Kids by Computer Science for Kids*
- The Basics of Small Basic 页面存档备份,存于 discussion with Vijaye Raji and Erik Meijer on SmallBasic*
- Introduction to Small Basic 页面存档备份,存于 discussion with Vijaye Raji and Robert Hess on SmallBasic*
- Microsoft Small Basic for .NET 页面存档备份,存于 Review of Microsoft Small Basic, with sample application
- Category:Microsoft Small Basic 页面存档备份,存于 在rosettacode.org 页面存档备份,存于上的Microsoft Small Basic中實現了許多任務
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.