QuickBASIC 4.5: 두 판 사이의 차이

도스박물관
둘러보기로 이동검색으로 이동
편집 요약 없음
편집 요약 없음
태그: 되돌려진 기여 시각 편집: 전환됨
1번째 줄: 1번째 줄:
{{Short description|BASIC 프로그래밍 언어용 IDE}}
{{Short description|IDE for the BASIC programming language}}
{{Distinguish|QBasic}}
{{Distinguish|QBasic}}
{{Infobox software
{{Infobox software
| name = QuickBASIC
| name                   = QuickBASIC
| screenshot = QuickBasic Opening Screen.png
| screenshot             = QuickBasic Opening Screen.png
| caption = 시작 화면
| caption               = Opening screen
| released = {{Start date and age|1985}}
| released               = {{Start date and age|1985}}
| developer = [[Microsoft]]
| developer             = [[Microsoft]]
| latest release version = 7
| latest release version = 7
| latest release date = {{Start date and age|1990}}
| latest release date   = {{Start date and age|1990}}
| operating_system = [[MS-DOS]], [[Classic Mac OS]]
| operating_system       = [[MS-DOS]], [[Classic Mac OS]]
| platform = [[x86]], [[Motorola 68000]]
| platform               = [[x86]], [[Motorola 68000]]
| genre = [[Microsoft BASIC]]
| genre                 = [[Microsoft BASIC]]
| license = [[Proprietary software|독점 소프트웨어]]
| license               = [[Proprietary software|Proprietary]]
}}
}}
'''Microsoft QuickBASIC'''(또는 '''QB''')[[Microsoft]]가 개발한 [[BASIC]] [[프로그래밍 언어]][통합 개발 환경] [[컴파일러]]입니다. QuickBASIC는 주로 [[MS-DOS]]에서 실행되었지만, [[Classic Mac OS]]용으로도 단기간 제공된 버전이 있습니다. GW-BASIC을 느슨하게 기반으로 하지만, 사용자 정의 타입, 향상된 프로그래밍 구조, 개선된 그래픽 및 디스크 지원, 그리고 [[BASIC interpreter|인터프리터]] 외에 컴파일러 기능도 추가되었습니다.
 
Microsoft는 QuickBASIC를 BASIC Professional Development System의 입문용 단계로 홍보했습니다.<ref>초기 Microsoft 문서에서는 이름을 "QuickBASIC"으로만 표기했으나, 이후 Microsoft 웹사이트에서는 "QuickBasic"도 사용되었습니다.</ref> Microsoft는 C와 Pascal용으로도 [[QuickC]][[QuickPascal]]이라는 유사한 IDE를 판매했습니다.
'''Microsoft QuickBASIC''' (also '''QB''') is an [[Integrated Development Environment]] (or IDE) and [[compiler]] for the [[BASIC]] [[programming language]] that was developed by [[Microsoft]]. QuickBASIC runs mainly on [[MS-DOS]], though there was also a short-lived version for [[Classic Mac OS]]. It is loosely based on [[GW-BASIC]] but adds user-defined types, improved programming structures, better graphics and disk support and a compiler in addition to the [[BASIC interpreter|interpreter]].
==역사==
Microsoft marketed QuickBASIC as the introductory level for their BASIC Professional Development System.<ref>Early Microsoft documentation rendered the name exclusively as "QuickBASIC", although later references on Microsoft's Web site also use "QuickBasic".</ref> Microsoft marketed two other similar IDEs for C and Pascal, viz [[QuickC]] and [[QuickPascal]].
Microsoft는 1985년 8월 18일, 5.25인치 360 KB [[플로피 디스크]] 한 장으로 QuickBASIC 첫 버전을 출시했습니다. QuickBASIC 2.0 버전 이후에는 [통합 개발 환경]을 포함하여, 화면 내 텍스트 편집기에서 직접 편집할 수 있게 되었습니다.
 
QuickBASIC에서는 여전히 라인 번호를 사용할 수 있었지만, 선택 사항이 되었습니다. 프로그램 점프(jump)는 이름 있는 레이블을 통해서도 작동했습니다. 이후 버전에서는 다중 [[조건문]]과 반복 블록과 같은 제어 구조가 추가되었습니다.
==History==
Microsoft의 "PC BASIC Compiler"DOS 실행 파일로 프로그램을 컴파일할 수 있게 포함되었습니다. 4.0 버전부터는 편집기 내에서 프로그램을 실행할 수 있는 인터프리터가 포함되었습니다. 인터프리터는 실행 파일을 만들기 전에 프로그램을 디버그하는 데 사용되었습니다. 그러나 인터프리터와 컴파일러 간에는 일부 미묘한 차이가 있어, 인터프리터에서 정상적으로 실행되던 대규모 프로그램이 컴파일 후 실패하거나 메모리 관리 루틴 차이로 아예 컴파일되지 않는 경우도 있었습니다.<ref>{{Cite web |url=https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/45850 |title=Microsoft Knowledge Base 45850: Memory Management in QuickBasic & Basic Compiler |access-date=2020-11-05 |archive-date=2021-03-02 |archive-url=https://web.archive.org/web/20210302211607/https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/45850 |url-status=dead }}</ref>
Microsoft released the first version of QuickBASIC on August 18, 1985 on a single 5.25-inch 360&nbsp;KB [[floppy disk]]. QuickBASIC version 2.0 and later contained an [[Integrated Development Environment]] (IDE), allowing users to edit directly in its on-screen text editor.
QuickBASIC의 마지막 버전은 1988년의 4.5였지만, Microsoft BASIC Professional Development System(PDS)의 개발은 1990년 10월 최종 버전 7.1까지 계속되었습니다.<ref>QuickBASIC 4.5는 360 KB 5.25인치 DSDD 플로피 5장 또는 720 KB 3.5인치 DSDD 플로피 3장 세트로 제공되었습니다. 3장 버전은 1.2 MB 5.25인치 또는 1.44 MB 3.5인치 DSHD 디스크에서 설치할 수도 있었습니다. 비용 절감을 위해 파일은 압축되어 후속 버전에서는 5.25인치 디스크 4장 또는 3.5인치 디스크 2장만 제공되었습니다.</ref> 동시에 QuickBASIC 패키징은 조용히 변경되어 BASIC PDS 7.1과 동일한 압축 방식을 사용하게 되었습니다.<ref>[http://support.microsoft.com/kb/65291 Microsoft Knowledge Base article 65291]</ref> IDE의 Basic PDS 7.x 버전은 QuickBASIC Extended(QBX)라 불렸으며, DOS에서만 실행되었습니다. 반면 나머지 Basic PDS 7.x는 OS/2에서도 실행되었습니다.
 
QuickBASIC 4.5는 수많은 책, 기사, 프로그래밍 튜토리얼의 주제가 되었으며, PC 시장에서 BASIC이 절정에 달했던 시점에 출시되었습니다. 1989년, Microsoft Press는 QuickBASIC 인터프리터를 책-소프트웨어 학습 시스템 ''[[Learn BASIC Now]]''에 번들로 포함시켰습니다. 가격은 39.95달러였고, Bill Gates가 작성한 서문이 포함되어 있었으며, BASIC이 400만 명 이상의 PC 사용자에게 사용되고 있다고 보고했습니다.<ref>{{cite book |last1=Gates |first1=Bill |last2=Halvorson |first2=Michael |last3=Rygmyr |first3=David |title=Learn BASIC Now |date=1989 |publisher=Microsoft Press |location=Redmond, WA |page=ix}}</ref>
Although still supported in QuickBASIC, line numbers became optional. Program jumps also worked with named labels. Later versions also added control structures, such as multiline [[conditional (programming)|conditional statements]] and loop blocks.
QuickBASIC와 Basic PDS의 후속 제품은 [[Visual Basic (classic)|Visual Basic]] 1.0 (MS-DOS용)으로, Standard와 Professional 버전으로 제공되었습니다. 이후 Visual Basic 버전에서는 DOS 버전이 포함되지 않았으며, Microsoft는 Windows용 응용 프로그램 개발에 집중했습니다.
 
QuickBASIC 4.5의 하위 집합인 [[QBasic]][[MS-DOS]] 5 이상 버전에 포함되었으며, 이전 MS-DOS에 포함된 [[GW-BASIC]]을 대체했습니다. QuickBASIC와 비교하면 QBasic는 인터프리터만 제공되고, 일부 기능이 부족하며, 프로그램 크기에 제한이 있고, 별도 프로그램 모듈을 지원하지 않습니다. 컴파일러가 없기 때문에 실행 파일을 만들 수는 없지만, 프로그램 소스 코드는 QuickBASIC 4.5, PDS 7.x, 또는 VBDOS 1.0 컴파일러로 컴파일할 수 있습니다.
Microsoft's "PC BASIC Compiler" was included for compiling programs into DOS executables. Beginning with version 4.0, the editor included an interpreter that allowed the programmer to run the program without leaving the editor. The interpreter was used to debug a program before creating an executable file. Unfortunately, there were some subtle differences between the interpreter and the compiler, which meant that large programs that ran correctly in the interpreter might fail after compilation, or not compile at all because of differences in the memory management routines.<ref>{{Cite web |url=https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/45850 |title=Microsoft Knowledge Base 45850: Memory Management in QuickBasic & Basic Compiler |access-date=2020-11-05 |archive-date=2021-03-02 |archive-url=https://web.archive.org/web/20210302211607/https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/45850 |url-status=dead }}</ref>
QuickBASIC 1.00의 [[Classic Mac OS|Apple Macintosh]]용 버전은 1988년에 출시되었습니다. [[System 6]] 이상을 탑재한 RAM 1MB 이상 Macintosh에서 공식 지원되었습니다.<ref>[http://support.microsoft.com/kb/31937 QuickBASIC for Macintosh system requirements]</ref> QuickBASIC는 [[System 7]]에서도 32비트 주소 지정 기능을 비활성화하면 실행할 수 있었습니다. Macintosh에서의 QuickBASIC 프로그래밍은 그래픽 사용자 인터페이스와 이벤트 기반 프로그래밍 모델을 제공하기 때문에 상당히 달랐습니다.<ref>{{cite book |last1=Halvorson |first1=Michael |last2=Rygmyr |first2=David |title=Learn BASIC for the Apple Macintosh Now |date=1990 |publisher=Microsoft Press |location=Redmond, WA}}</ref>
 
==문법 예제==
The last version of QuickBASIC was version 4.5 (1988), although development of the Microsoft BASIC Professional Development System (PDS) continued until its last release of version 7.1 in October 1990.<ref>QuickBASIC 4.5 was delivered on a set of five 360&nbsp;KB 5.25-inch DSDD floppy disks or three 720&nbsp;KB 3.5-inch DSDD floppy disks. The three-disk version could also be installed from 1.2&nbsp;MB 5.25-inch or 1.44&nbsp;MB 3.5-inch DSHD disks. To save costs, the files were compressed and later versions were shipped on just four 5.25-inch disks or two 3.5-inch disks.</ref> At the same time, the QuickBASIC packaging was silently changed so that the disks used the same compression used for BASIC PDS 7.1.<ref>[http://support.microsoft.com/kb/65291 Microsoft Knowledge Base article 65291]</ref> The Basic PDS 7.x version of the IDE was called QuickBASIC Extended (QBX), and it only ran on DOS, unlike the rest of Basic PDS 7.x, which also ran on OS/2.
[[Hello, World]] 간단 버전:
 
QuickBASIC 4.5 was the subject of numerous books, articles, and programming tutorials, and arrived near the high-point of BASIC saturation in the PC marketplace. In 1989, Microsoft Press bundled the QuickBASIC Interpreter into a book-and-software learning system called ''[[Learn BASIC Now]]''. The product was priced at $39.95 and included a Foreword written by Bill Gates, who reported that BASIC was in active use by over four million PC users.<ref>{{cite book |last1=Gates |first1=Bill |last2=Halvorson |first2=Michael |last3=Rygmyr |first3=David |title=Learn BASIC Now |date=1989 |publisher=Microsoft Press |location=Redmond, WA |page=ix}}</ref>
 
The successor to QuickBASIC and Basic PDS was [[Visual Basic (classic)|Visual Basic]] version 1.0 for MS-DOS, shipped in Standard and Professional versions. Later versions of Visual Basic did not include DOS versions, as Microsoft concentrated on Windows applications.
 
A subset of QuickBASIC 4.5, named [[QBasic]], was included with [[MS-DOS]] 5 and later versions, replacing the [[GW-BASIC]] included with previous versions of MS-DOS. Compared to QuickBASIC, QBasic is limited to an interpreter only, lacks a few functions, can only handle programs of a limited size, and lacks support for separate program modules. Since it lacks a compiler, it cannot be used to produce executable files, although its program source code can still be compiled by a QuickBASIC 4.5, PDS 7.x or VBDOS 1.0 compiler, if available.
 
QuickBASIC 1.00 for the [[Classic Mac OS|Apple Macintosh]] operating system was launched in 1988. It was officially supported on machines running [[System 6]] with at least 1&nbsp;MB of RAM.<ref>[http://support.microsoft.com/kb/31937 QuickBASIC for Macintosh system requirements]</ref> QuickBASIC could also be run on [[System 7]], as long as 32-bit addressing was disabled. QuickBASIC programming was significantly different on the Macintosh, because the system offered a graphical user interface and an event-driven programming model.<ref>{{cite book |last1=Halvorson |first1=Michael |last2=Rygmyr |first2=David |title=Learn BASIC for the Apple Macintosh Now |date=1990 |publisher=Microsoft Press |location=Redmond, WA}}</ref>
 
==Syntax example==
[[Hello, World]], shortest version:
<syntaxhighlight lang="QBasic">
<syntaxhighlight lang="QBasic">
?"Hello, World"
?"Hello, World"
</syntaxhighlight>
</syntaxhighlight>
[[Hello, World]] 확장 버전:
 
[[Hello, World]], extended version:
<syntaxhighlight lang="QBasic">
<syntaxhighlight lang="QBasic">
CLS
CLS
36번째 줄: 47번째 줄:
END
END
</syntaxhighlight>
</syntaxhighlight>
[[99 Bottles of Beer]]:
[[99 Bottles of Beer]]:
<syntaxhighlight lang="QBasic">
<syntaxhighlight lang="QBasic">
51번째 줄: 63번째 줄:
PRINT "Go to the store and buy some more, 99 bottles of beer on the wall."
PRINT "Go to the store and buy some more, 99 bottles of beer on the wall."
</syntaxhighlight>
</syntaxhighlight>
그래픽 예제:
 
Graphics example:
<syntaxhighlight lang="QBasic">
<syntaxhighlight lang="QBasic">
SCREEN 13
SCREEN 13
60번째 줄: 73번째 줄:
flag2 = 1: flag3 = 1:flag4 = 1: flag5 = 1: flag6 = 1: flag7 = 1
flag2 = 1: flag3 = 1:flag4 = 1: flag5 = 1: flag6 = 1: flag7 = 1
DO
DO
GET (1, 38)-(318, 62), a
    GET (1, 38)-(318, 62), a
PUT (2, 38), a, PSET
    PUT (2, 38), a, PSET
LINE (1, 38)-(1, 62), col%
    LINE (1, 38)-(1, 62), col%
IF flag = 1 THEN col% = col% + 1: IF col% = 32 THEN flag = 2
    IF flag = 1 THEN col% = col% + 1: IF col% = 32 THEN flag = 2
IF flag = 2 THEN col% = col% - 1: IF col% = 16 THEN flag = 1
    IF flag = 2 THEN col% = col% - 1: IF col% = 16 THEN flag = 1
GET (2, 63)-(319, 87), b
    GET (2, 63)-(319, 87), b
PUT (1, 63), b, PSET
    PUT (1, 63), b, PSET
LINE (319, 63)-(319, 87), col1%
    LINE (319, 63)-(319, 87), col1%
IF flag1 = 1 THEN col1% = col1% + 1: IF col1% = 32 THEN flag1 = 2
    IF flag1 = 1 THEN col1% = col1% + 1: IF col1% = 32 THEN flag1 = 2
IF flag1 = 2 THEN col1% = col1% - 1: IF col1% = 16 THEN flag1 = 1
    IF flag1 = 2 THEN col1% = col1% - 1: IF col1% = 16 THEN flag1 = 1
GET (1, 88)-(318, 112), c
    GET (1, 88)-(318, 112), c
PUT (2, 88), c, PSET
    PUT (2, 88), c, PSET
LINE (1, 88)-(1, 112), col2%
    LINE (1, 88)-(1, 112), col2%
IF flag2 = 1 THEN col2% = col2% + 1: IF col2% = 32 THEN flag2 = 2
    IF flag2 = 1 THEN col2% = col2% + 1: IF col2% = 32 THEN flag2 = 2
IF flag2 = 2 THEN col2% = col2% - 1: IF col2% = 16 THEN flag2 = 1
    IF flag2 = 2 THEN col2% = col2% - 1: IF col2% = 16 THEN flag2 = 1
GET (2, 113)-(319, 137), d
    GET (2, 113)-(319, 137), d
PUT (1, 113), d, PSET
    PUT (1, 113), d, PSET
LINE (319, 113)-(319, 137), col3%
    LINE (319, 113)-(319, 137), col3%
IF flag3 = 1 THEN col3% = col3% + 1: IF col3% = 32 THEN flag3 = 2
    IF flag3 = 1 THEN col3% = col3% + 1: IF col3% = 32 THEN flag3 = 2
IF flag3 = 2 THEN col3% = col3% - 1: IF col3% = 16 THEN flag3 = 1
    IF flag3 = 2 THEN col3% = col3% - 1: IF col3% = 16 THEN flag3 = 1
GET (1, 138)-(318, 162), e
    GET (1, 138)-(318, 162), e
PUT (2, 138), e, PSET
    PUT (2, 138), e, PSET
LINE (1, 138)-(1, 162), col4%
    LINE (1, 138)-(1, 162), col4%
IF flag4 = 1 THEN col4% = col4% + 1: IF col4% = 32 THEN flag4 = 2
    IF flag4 = 1 THEN col4% = col4% + 1: IF col4% = 32 THEN flag4 = 2
IF flag4 = 2 THEN col4% = col4% - 1: IF col4% = 16 THEN flag4 = 1
    IF flag4 = 2 THEN col4% = col4% - 1: IF col4% = 16 THEN flag4 = 1
LOOP UNTIL LEN(INKEY$)
LOOP UNTIL LEN(INKEY$)
</syntaxhighlight>
</syntaxhighlight>
[[버블 정렬]]:
 
[[Bubble sort]]:
 
<syntaxhighlight lang="QBasic">
<syntaxhighlight lang="QBasic">
REM sample of bubble sort
REM sample of bubble sort
93번째 줄: 108번째 줄:
DIM A(1 TO N) AS INTEGER
DIM A(1 TO N) AS INTEGER
FOR L = 1 TO N
FOR L = 1 TO N
A(L) = INT(RND * 10 + 1)
    A(L) = INT(RND * 10 + 1)
NEXT
NEXT
FOR X = 1 TO N - 1
FOR X = 1 TO N - 1
FOR Y = X + 1 TO N
    FOR Y = X + 1 TO N
IF A(X) < A(Y) THEN SWAP A(X), A(Y)
        IF A(X) < A(Y) THEN SWAP A(X), A(Y)
NEXT
    NEXT
NEXT
NEXT
FOR L = 1 TO N
FOR L = 1 TO N
PRINT A(L)
    PRINT A(L)
NEXT
NEXT
END
END
</syntaxhighlight>
</syntaxhighlight>
==현재 사용==
 
QuickBASIC는 취미 프로그래머 커뮤니티에서 [[비디오 게임]], [[GUI]], [[유틸리티 소프트웨어]] 작성용으로 컴파일러를 사용하고 있습니다.<ref>{{cite web|url=http://www.qbasic.com/games/|title=QBASIC Games Directory|date=2008-11-29|access-date=2008-12-28|archive-url=https://web.archive.org/web/20140904181932/http://www.qbasic.com/games/|archive-date=4 September 2014}}</ref><ref>{{cite web|url=http://qbasicgui.datacomponents.net/|title=GUI Reviews|date=2008-12-19|access-date=2008-12-28}}</ref><ref>{{cite web|url=http://theguiblog.com/|title=The (BASIC) GUI Blog|date=2011-02-06|access-date=2011-02-06}}</ref> 커뮤니티에는 여러 웹사이트, [[게시판]], [[온라인 매거진]]이 존재합니다.<ref>{{cite web|url=http://qbasicnews.com/|title=Qbasic/Quickbasic News|date=2008-12-26|access-date=2008-12-28}}</ref><ref>{{cite web|url=http://www.petesqbsite.com/sections/express/express.shtml|title=QB Express|year=2008|access-date=2008-12-28|publisher=Pete's QBASIC/QuickBasic Site}}</ref>
==Current uses==
현재 프로그래머들은 [[DOS]] [[에뮬레이터]](예: [[DOSBox]])를 사용하여 QuickBASIC를 [[Linux]]나 현대 [[개인용 컴퓨터]]에서 실행하기도 합니다.<ref>{{cite web|url=http://penguinpetes.com/b2evo/index.php?title=howto_play_with_your_old_qbasic_programs&more=1&c=1&tb=1&pb=1|title=HOWTO Play With Your Old QBasic Programs on Linux|date=2007-03-31|access-date=2008-12-28|author=Pete Trbovich|archive-date=2017-08-02|archive-url=https://web.archive.org/web/20170802042740/http://penguinpetes.com/b2evo/index.php?title=howto_play_with_your_old_qbasic_programs&more=1&c=1&tb=1&pb=1|url-status=dead}}</ref><ref>{{cite web|url=http://www.petesqbsite.com/sections/express/issue28/index.html#kiyotewolf|title=Kiyote Wolf on a Variety of Subjects|date= 2008-05-10|access-date= 2008-12-28|author= Kiyote Wolf|publisher= QB Express}}</ref> 이와 유사한 대안으로 [[FreeBASIC]][[QB64]]가 있지만, 아직 모든 QBasic/QuickBASIC 프로그램을 실행할 수 있는 것은 아닙니다.<ref>예: FreeBASIC는 QBasic의 "ON PLAY" 백그라운드 음악 콜백이나 [[PEEK POKE]]를 통한 [[I/O 포트]] 사용을 지원하지 않습니다.</ref>
QuickBASIC has a community of hobby programmers who use the compiler to write [[video game]]s, [[GUI]]s and [[Utility software|utilities]].<ref>{{cite web|url=http://www.qbasic.com/games/|title=QBASIC Games Directory|date=2008-11-29|access-date=2008-12-28|archive-url=https://web.archive.org/web/20140904181932/http://www.qbasic.com/games/|archive-date=4 September 2014}}</ref><ref>{{cite web|url=http://qbasicgui.datacomponents.net/|title=GUI Reviews|date=2008-12-19|access-date=2008-12-28}}</ref><ref>{{cite web|url=http://theguiblog.com/|title=The (BASIC) GUI Blog|date=2011-02-06|access-date=2011-02-06}}</ref> The community has several Web sites, [[message board]]s and [[online magazine]]s.<ref>{{cite web|url=http://qbasicnews.com/|title=Qbasic/Quickbasic News|date=2008-12-26|access-date=2008-12-28}}</ref><ref>{{cite web|url=http://www.petesqbsite.com/sections/express/express.shtml|title=QB Express|year=2008|access-date=2008-12-28|publisher=Pete's QBASIC/QuickBasic Site}}</ref>
2008년 이후 QuickBASIC 4.x와 7.1용 [[TCP/IP]] 루틴 세트가 소프트웨어에 대한 관심을 재점화했습니다. 특히 [[레트로 컴퓨터]] 취미 커뮤니티에서는 DOS를 실행하는 구형 컴퓨터용 소프트웨어를 작성하여 LAN 또는 인터넷을 통해 다른 컴퓨터와 연결할 수 있게 되었습니다. 이를 통해 [[8088]]과 같이 오래된 시스템도 [[웹 서버]]로 동작하거나 [[IRC]]를 사용할 수 있는 등 새로운 기능을 수행할 수 있게 되었습니다.<ref>{{cite web|url=http://www.rubbermallet.org/index.html|title= rubbermallet.org: Where QuickBASIC gets much more powerful|date= 2008-07-12|access-date= 2008-12-28|author=Mike Chambers}}</ref>
 
==후속 제품==
Today, programmers sometimes use DOS [[emulator]]s, such as [[DOSBox]], to run QuickBASIC on [[Linux]] and on modern [[personal computer]]s that no longer support the compiler.<ref>{{cite web|url=http://penguinpetes.com/b2evo/index.php?title=howto_play_with_your_old_qbasic_programs&more=1&c=1&tb=1&pb=1|title=HOWTO Play With Your Old QBasic Programs on Linux|date=2007-03-31|access-date=2008-12-28|author=Pete Trbovich|archive-date=2017-08-02|archive-url=https://web.archive.org/web/20170802042740/http://penguinpetes.com/b2evo/index.php?title=howto_play_with_your_old_qbasic_programs&more=1&c=1&tb=1&pb=1|url-status=dead}}</ref><ref>{{cite web|url=http://www.petesqbsite.com/sections/express/issue28/index.html#kiyotewolf|title=Kiyote Wolf on a Variety of Subjects|date= 2008-05-10|access-date= 2008-12-28|author= Kiyote Wolf|publisher= QB Express}}</ref> Alternatives to this include [[FreeBASIC]] and [[QB64]], but they cannot yet run ''all'' QBasic/QuickBASIC programs.<ref>For example, FreeBASIC does not yet support QBasic's "ON PLAY" callback for background music, or the use of [[PEEK and POKE]] to [[I/O port]]s.</ref>
Microsoft의 [[Visual Basic (classic)|Visual Basic]]가 QuickBASIC의 후속 제품입니다. [[PowerBASIC]] [[FreeBASIC]]과 같은 다른 컴파일러는 호환성 정도가 다릅니다. [[QB64]][[멀티플랫폼]] QuickBASIC to C++ 변환기로, 거의 100% 호환성을 유지하며 [[Windows]], [[Linux]], [[macOS]]용 네이티브 컴파일을 지원합니다.<ref>{{cite web|url=http://basicprogramming.org/pcopy/issue70 |title=Interview With Galleon |date=2008-05-26 |access-date=2008-07-14 |author-first=E. K. |author-last=Virtanen |url-status=unfit |archive-url=https://web.archive.org/web/20160306225525/http://basicprogramming.org/pcopy/issue70 |archive-date=March 6, 2016 }}</ref>
 
==같이 보기==
Since 2008, a set of [[TCP/IP]] routines for QuickBASIC 4.x and 7.1 has revitalized some interest in the software. In particular, the [[vintage computer]] hobbyist community has been able to write software for old computers that run DOS, allowing these machines to access other computers through a [[local area network|LAN]] or the internet. This has allowed systems even as old as an [[8088]] to serve new functions, such as acting as a [[Web server]] or using [[IRC]].<ref>{{cite web|url=http://www.rubbermallet.org/index.html|title= rubbermallet.org: Where QuickBASIC gets much more powerful|date= 2008-07-12|access-date= 2008-12-28|author=Mike Chambers}}</ref>
[[QBasic]]
 
[[Turbo Basic]]
==Successors==
[[QB64]]
Microsoft's [[Visual Basic (classic)|Visual Basic]] was the successor of QuickBASIC. Other compilers, like [[PowerBASIC]] and [[FreeBASIC]], have varying degrees of compatibility. [[QB64]], a [[multiplatform]] QuickBASIC to C++ translator, retains close to 100% compatibility and compiles natively for [[Microsoft Windows|Windows]], [[Linux]] and [[macOS]].<ref>{{cite web|url=http://basicprogramming.org/pcopy/issue70 |title=Interview With Galleon |date=2008-05-26 |access-date=2008-07-14 |author-first=E. K. |author-last=Virtanen |url-status=unfit |archive-url=https://web.archive.org/web/20160306225525/http://basicprogramming.org/pcopy/issue70 |archive-date=March 6, 2016 }}</ref>
==참고==
 
==See also==
* [[QBasic]]
* [[Turbo Basic]]
* [[QB64]]
 
==References==
{{Reflist|30em}}
{{Reflist|30em}}
==외부 링크==
 
[https://winworldpc.com/product/quickbasic/45 QuickBasic 4.5]
== External links ==
* [https://winworldpc.com/product/quickbasic/45 QuickBasic 4.5]
 
{{BASIC}}
{{BASIC}}
{{Integrated development environments}}
{{Integrated development environments}}
{{DEFAULTSORT:Quickbasic}}
{{DEFAULTSORT:Quickbasic}}
[[Category:Discontinued Microsoft BASICs]] <!-- A subcategory of [[Category:Microsoft development tools]] -->
[[Category:Discontinued Microsoft BASICs]] <!-- A subcategory of [[Category:Microsoft development tools]] -->
126번째 줄: 150번째 줄:
[[Category:DOS software]]
[[Category:DOS software]]
[[Category:1985 software]]
[[Category:1985 software]]
[[Category:Classic Mac OS programming
[[Category:Classic Mac OS programming tools]]
[[Category:BASIC programming language family]]

2025년 11월 18일 (화) 13:22 판

틀:Short description 틀:Distinguish 틀:Infobox software

Microsoft QuickBASIC (also QB) is an Integrated Development Environment (or IDE) and compiler for the BASIC programming language that was developed by Microsoft. QuickBASIC runs mainly on MS-DOS, though there was also a short-lived version for Classic Mac OS. It is loosely based on GW-BASIC but adds user-defined types, improved programming structures, better graphics and disk support and a compiler in addition to the interpreter. Microsoft marketed QuickBASIC as the introductory level for their BASIC Professional Development System.[1] Microsoft marketed two other similar IDEs for C and Pascal, viz QuickC and QuickPascal.

History

Microsoft released the first version of QuickBASIC on August 18, 1985 on a single 5.25-inch 360 KB floppy disk. QuickBASIC version 2.0 and later contained an Integrated Development Environment (IDE), allowing users to edit directly in its on-screen text editor.

Although still supported in QuickBASIC, line numbers became optional. Program jumps also worked with named labels. Later versions also added control structures, such as multiline conditional statements and loop blocks.

Microsoft's "PC BASIC Compiler" was included for compiling programs into DOS executables. Beginning with version 4.0, the editor included an interpreter that allowed the programmer to run the program without leaving the editor. The interpreter was used to debug a program before creating an executable file. Unfortunately, there were some subtle differences between the interpreter and the compiler, which meant that large programs that ran correctly in the interpreter might fail after compilation, or not compile at all because of differences in the memory management routines.[2]

The last version of QuickBASIC was version 4.5 (1988), although development of the Microsoft BASIC Professional Development System (PDS) continued until its last release of version 7.1 in October 1990.[3] At the same time, the QuickBASIC packaging was silently changed so that the disks used the same compression used for BASIC PDS 7.1.[4] The Basic PDS 7.x version of the IDE was called QuickBASIC Extended (QBX), and it only ran on DOS, unlike the rest of Basic PDS 7.x, which also ran on OS/2.

QuickBASIC 4.5 was the subject of numerous books, articles, and programming tutorials, and arrived near the high-point of BASIC saturation in the PC marketplace. In 1989, Microsoft Press bundled the QuickBASIC Interpreter into a book-and-software learning system called Learn BASIC Now. The product was priced at $39.95 and included a Foreword written by Bill Gates, who reported that BASIC was in active use by over four million PC users.[5]

The successor to QuickBASIC and Basic PDS was Visual Basic version 1.0 for MS-DOS, shipped in Standard and Professional versions. Later versions of Visual Basic did not include DOS versions, as Microsoft concentrated on Windows applications.

A subset of QuickBASIC 4.5, named QBasic, was included with MS-DOS 5 and later versions, replacing the GW-BASIC included with previous versions of MS-DOS. Compared to QuickBASIC, QBasic is limited to an interpreter only, lacks a few functions, can only handle programs of a limited size, and lacks support for separate program modules. Since it lacks a compiler, it cannot be used to produce executable files, although its program source code can still be compiled by a QuickBASIC 4.5, PDS 7.x or VBDOS 1.0 compiler, if available.

QuickBASIC 1.00 for the Apple Macintosh operating system was launched in 1988. It was officially supported on machines running System 6 with at least 1 MB of RAM.[6] QuickBASIC could also be run on System 7, as long as 32-bit addressing was disabled. QuickBASIC programming was significantly different on the Macintosh, because the system offered a graphical user interface and an event-driven programming model.[7]

Syntax example

Hello, World, shortest version:

?"Hello, World"

Hello, World, extended version:

CLS
PRINT "Hello, World"
END

99 Bottles of Beer:

LET BOTTLES = 99: LET BOTTLES$ = "99": LET BOTTLE$ = " bottles"
FOR A = 1 TO 99
PRINT BOTTLES$; BOTTLE$; " of beer on the wall, "; BOTTLES$; BOTTLE$; " of beer."
LET BOTTLES = BOTTLES - 1
IF BOTTLES > 0 THEN LET BOTTLES$ = LTRIM$(STR$(BOTTLES)): LET PRONOUN$ = "one"
IF BOTTLES = 0 THEN LET BOTTLES$ = "no more": LET PRONOUN$ = "it"
IF BOTTLES <> 1 THEN LET BOTTLE$ = " bottles"
IF BOTTLES = 1 THEN LET BOTTLE$ = " bottle"
PRINT "Take "; PRONOUN$; " down and pass it around, "; BOTTLES$; BOTTLE$; " of beer on the wall."
PRINT: NEXT A
PRINT "No more bottles of beer on the wall, no more bottles of beer."
PRINT "Go to the store and buy some more, 99 bottles of beer on the wall."

Graphics example:

SCREEN 13
DIM a(3976) AS INTEGER, b(3976) AS INTEGER, c(3976) AS INTEGER
DIM d(3976) AS INTEGER, e(3976) AS INTEGER
col% = 16: col1% = 16: col2% = 16: col3% = 16: col4% = 16
col5% = 16: col6% = 16: col7% = 16: flag = 1: flag1 = 1
flag2 = 1: flag3 = 1:flag4 = 1: flag5 = 1: flag6 = 1: flag7 = 1
DO
    GET (1, 38)-(318, 62), a
    PUT (2, 38), a, PSET
    LINE (1, 38)-(1, 62), col%
    IF flag = 1 THEN col% = col% + 1: IF col% = 32 THEN flag = 2
    IF flag = 2 THEN col% = col% - 1: IF col% = 16 THEN flag = 1
    GET (2, 63)-(319, 87), b
    PUT (1, 63), b, PSET
    LINE (319, 63)-(319, 87), col1%
    IF flag1 = 1 THEN col1% = col1% + 1: IF col1% = 32 THEN flag1 = 2
    IF flag1 = 2 THEN col1% = col1% - 1: IF col1% = 16 THEN flag1 = 1
    GET (1, 88)-(318, 112), c
    PUT (2, 88), c, PSET
    LINE (1, 88)-(1, 112), col2%
    IF flag2 = 1 THEN col2% = col2% + 1: IF col2% = 32 THEN flag2 = 2
    IF flag2 = 2 THEN col2% = col2% - 1: IF col2% = 16 THEN flag2 = 1
    GET (2, 113)-(319, 137), d
    PUT (1, 113), d, PSET
    LINE (319, 113)-(319, 137), col3%
    IF flag3 = 1 THEN col3% = col3% + 1: IF col3% = 32 THEN flag3 = 2
    IF flag3 = 2 THEN col3% = col3% - 1: IF col3% = 16 THEN flag3 = 1
    GET (1, 138)-(318, 162), e
    PUT (2, 138), e, PSET
    LINE (1, 138)-(1, 162), col4%
    IF flag4 = 1 THEN col4% = col4% + 1: IF col4% = 32 THEN flag4 = 2
    IF flag4 = 2 THEN col4% = col4% - 1: IF col4% = 16 THEN flag4 = 1
LOOP UNTIL LEN(INKEY$)

Bubble sort:

REM sample of bubble sort
N = 10
DIM A(1 TO N) AS INTEGER
FOR L = 1 TO N
    A(L) = INT(RND * 10 + 1)
NEXT
FOR X = 1 TO N - 1
    FOR Y = X + 1 TO N
        IF A(X) < A(Y) THEN SWAP A(X), A(Y)
    NEXT
NEXT
FOR L = 1 TO N
    PRINT A(L)
NEXT
END

Current uses

QuickBASIC has a community of hobby programmers who use the compiler to write video games, GUIs and utilities.[8][9][10] The community has several Web sites, message boards and online magazines.[11][12]

Today, programmers sometimes use DOS emulators, such as DOSBox, to run QuickBASIC on Linux and on modern personal computers that no longer support the compiler.[13][14] Alternatives to this include FreeBASIC and QB64, but they cannot yet run all QBasic/QuickBASIC programs.[15]

Since 2008, a set of TCP/IP routines for QuickBASIC 4.x and 7.1 has revitalized some interest in the software. In particular, the vintage computer hobbyist community has been able to write software for old computers that run DOS, allowing these machines to access other computers through a LAN or the internet. This has allowed systems even as old as an 8088 to serve new functions, such as acting as a Web server or using IRC.[16]

Successors

Microsoft's Visual Basic was the successor of QuickBASIC. Other compilers, like PowerBASIC and FreeBASIC, have varying degrees of compatibility. QB64, a multiplatform QuickBASIC to C++ translator, retains close to 100% compatibility and compiles natively for Windows, Linux and macOS.[17]

See also

References

틀:Reflist

External links

틀:BASIC 틀:Integrated development environments

  1. Early Microsoft documentation rendered the name exclusively as "QuickBASIC", although later references on Microsoft's Web site also use "QuickBasic".
  2. 틀:Cite web
  3. QuickBASIC 4.5 was delivered on a set of five 360 KB 5.25-inch DSDD floppy disks or three 720 KB 3.5-inch DSDD floppy disks. The three-disk version could also be installed from 1.2 MB 5.25-inch or 1.44 MB 3.5-inch DSHD disks. To save costs, the files were compressed and later versions were shipped on just four 5.25-inch disks or two 3.5-inch disks.
  4. Microsoft Knowledge Base article 65291
  5. 틀:Cite book
  6. QuickBASIC for Macintosh system requirements
  7. 틀:Cite book
  8. 틀:Cite web
  9. 틀:Cite web
  10. 틀:Cite web
  11. 틀:Cite web
  12. 틀:Cite web
  13. 틀:Cite web
  14. 틀:Cite web
  15. For example, FreeBASIC does not yet support QBasic's "ON PLAY" callback for background music, or the use of PEEK and POKE to I/O ports.
  16. 틀:Cite web
  17. 틀:Cite web