PowerBASIC

PowerBASIC
发行时间1996年?
当前版本
  • 10.0 (2011年5月4日;穩定版本)
編輯維基數據鏈接
操作系统Windows, DOS
網站PowerBASIC: Basic Compilers
主要實作產品
PowerBASIC
啟發語言
BASIC

PowerBASIC由位於美國佛羅里達州威尼斯的PowerBASIC公司所製作,為一種BASIC編譯器,分別擁有DOS版本及Windows版本(其中又有命令行版本及圖形界面開發版本)。DOS版本使用的語法類似QBasicQuickBASIC,而Windows版本則類似其他程式編譯器,結合標準BASIC語言和API調用。最早發布的版本被稱作BASIC/Z,之後由Borland發行時叫做Turbo BASIC。1989年Borland不再販售Turbo BASIC與Turbo Pascal,Turbo BASIC由原開發者成立公司,而以PowerBASIC為名繼續發行。[1]

語言特色[编辑]

PowerBASIC的Windows版本並沒有類似Visual Basic的圖形開發界面,取而代之的是一個包含調試工具的純文字開發界面,但官方及其他團體均有提供另外開發的圖形開發界面以解決文字開發界面的不足,例如官方開發的PowerBASIC Forms及HelloBasic.com開發的PwrDev Developer等等。PowerBASIC能編譯出機器代碼,即不需要運行庫的程式,編譯所得程式體積小與運行速度快,以此做為與過往執行效率不佳的BASIC語言的差異,聲稱其運行速度不遜於當今流行的電腦語言,例如Visual Basic, C++[2]同時PowerBASIC支援開發更多範疇的程序,例如DLL控制台程式甚至驅動程式

此外,PB/WIN 10.0雖然是32位元程式,但與Windows 10相容。也支援多線序、序列埠通訊,並提供完整的圖型支援。[3]

版本更新[4][编辑]

版本 發佈日期 主要更新內容 後續更新
PB/WIN 7.0 2003年5月5日[5] --- 於2003年5月29日更新7.02版本。[6]
於2004年4月15日更新7.03版本。[7]
於2004年5月10日更新7.04版本。[8]
PB/WIN 8.0 2005年3月18日[9] --- 於2006年9月21日更新8.02版本。
於2006年11月20日更新8.03版本。[10]
於2007年10月9日更新8.04版本。[11]
PB/WIN 9.0 2008年8月12日[12]
  1. 加入對物件的支持
於2009年3月3日更新9.01版本。[13]
於2009年10月8日更新9.02版本。[14]
於2010年1月6日更新9.03版本。[15]
於2010年3月15日更新9.04版本。[16]
於2010年7月30日更新9.05版本。[17]
PB/WIN 10.0 2011年1月29日[18]
  1. 加入靜態連結庫(.sll)的支持;
  2. 加強對Unicode字串的支持;
  3. 加強對多線程的支持。
尚未有版本更新。

代碼範例[编辑]

  • 編寫靜態連結庫的範例代碼:
'編譯為conversion.sll檔案 #COMPILE SLL "conversion.sll" #DIM ALL  '由毫米換算成吋的函數 FUNCTION MillimetersToInches (BYVAL mm AS DOUBLE) COMMON AS DOUBLE     FUNCTION = mm * 0.03937# END FUNCTION 
  • 編寫動態連結庫的範例代碼:
#COMPILE DLL "conversion.dll" #DIM ALL  FUNCTION LIBMAIN (BYVAL hInstance   AS LONG, _                   BYVAL fwdReason   AS LONG, _                   BYVAL lpvReserved AS LONG) AS LONG     SELECT CASE fwdReason     CASE %DLL_PROCESS_ATTACH         FUNCTION = 1     CASE %DLL_PROCESS_DETACH         FUNCTION = 1     CASE %DLL_THREAD_ATTACH         FUNCTION = 1     CASE %DLL_THREAD_DETACH         FUNCTION = 1     END SELECT END FUNCTION  '由毫米換算成吋的函數 FUNCTION MillimetersToInches ALIAS "MillimetersToInches" (BYVAL mm AS DOUBLE) EXPORT AS DOUBLE     FUNCTION = mm * 0.03937# END FUNCTION 

参考文献[编辑]

  1. ^ PowerBASIC makes smooth move; Tech company finds region's affordability attractive.. Sarasota Herald Tribune (October , 2000). [2008-03-12]. (原始内容存档于2011-05-18). 
  2. ^ PowerBASIC官方介紹. [2010-02-12]. (原始内容存档于2008-03-08). 
  3. ^ PowerBASIC Compiler for Windows Version 10 (PDF). [2019-12-02]. (原始内容存档 (PDF)于2018-11-07). 
  4. ^ 版本更新資料來源:PowerBASIC官方論壇產品發佈頁. [2010-02-12]. (原始内容存档于2010-01-03). 
  5. ^ Free Updates to PB/CC 3 and PB/Win 7.0 - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  6. ^ Free Updates to PB/CC 3 and PB/Win 7(x.02 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  7. ^ Free Updates to PB/CC 3 and PB/Win 7(x.03 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  8. ^ Free Updates to PB/CC 3 and PB/Win 7(x.04 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  9. ^ Free Updates to PB/CC 4, PB/Win 8, and PB/Forms 1.5 - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  10. ^ Free Updates to PB/CC 4 and PB/Win 8(x.03 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  11. ^ Free Updates to PB/CC 4 and PB/Win 8(x.04 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2010-01-04). 
  12. ^ Release of PowerBASIC 9.0 for Windows - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  13. ^ Free Updates to PB/CC 5 and PB/Win 9(x.01 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  14. ^ Free Updates to PB/CC 5 and PB/Win 9(x.02 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  15. ^ Free Updates to PB/CC 5 and PB/Win 9(x.03 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  16. ^ Free Updates to PB/CC 5 and PB/Win 9(x.04 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  17. ^ Free Updates to PB/CC 5 and PB/Win 9(x.05 release) - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2011-07-18). 
  18. ^ PB/Win 10 & PB/CC 6 -- What's new? - PowerBASIC Peer Support Forums. [2011-04-09]. (原始内容存档于2014-07-24). 

外部連結[编辑]