文章編號: 73320 - 上次校閱: 2003年5月12日 - 版次: 2.0 不支援在 QBasic GW-基本/BASICA 關鍵字
結論QBasic 中不支援下列 GW-基本/BASICA 關鍵字: AUTO EDIT MERGE RENUM CONT LIST MOTOR SAVE DEF USR LLIST NEW USR DELETE LOAD BSAVE BLOAD CALL ABSOLUTE CHAIN COMMON DECLARE DEFtype DIM DRAW EOF FIELD PLAY 其他相關資訊不同的行為在 QBasic 關鍵字的是,如下所示:
Keyword Description
------- -----------
BSAVE, BLOAD QBasic does not support the cassette device with
BSAVE and BLOAD, and memory locations may be
different.
CALL ABSOLUTE Assembly language programs invoked from BASICA
that have string arguments must be revised for
QBasic because QBasic string descriptors are 4
bytes long. The 4 bytes are the low byte and high
byte of the string length followed by the low
byte and high byte of the string address.
CHAIN QBasic does not allow you to specify a line
number with CHAIN and does not support the ALL,
MERGE, or DELETE options in BASICA.
COMMON, DECLARE QBasic does not allow executable statements to
appear before COMMON and DECLARE statements.
DEFtype If BASICA encounters a variable without an
explicit type (indicated by !, #, &, $, or %), it
uses the default type set by the most recent
DEFtype statement. For example, the type of the
variable IFLAG changes from integer to single
precision in the following BASICA code fragment:
10 DEFINT I
20 PRINT IFLAG
30 DEFSNG I
40 GOTO 20
In QBasic, a variable's type cannot be changed
after it appears in a program.
DIM All arrays in BASICA are dynamic because BASICA
always allocates array storage while a program
runs. In QBasic, DIM can declare either a static
or dynamic array.
DRAW, PLAY DRAW and PLAY statements in BASICA that use
variables or other command strings within command
strings must be modified for QBasic. Use the
VARPTR$ function, which returns a string
representation of the variable's address:
BASICA Statement QBasic Equivalent
---------------- -----------------
DRAW "Xcmdstring$" DRAW "X" + VARPTR$ (cmdstring$)
DRAW "TA = angle" DRAW "TA =" + VARPTR$(angle)
EOF When you direct input from a file to a BASICA
program, EOF(0) returns true at the end of the
input file. In QBasic, EOF(0) returns true after
the next record is read past the end of the input
file. For example, the following program runs in
BASICA, but generates an "Input past end of file"
error message in QBasic:
5 WHILE NOT EOF(0)
10 LINE INPUT ; A$
15 WEND
FIELD When a random-access file is closed in BASICA
with a CLOSE or RESET statement, field variables
retain the last value assigned to them by a GET
statement. In QBasic, all field variables are
reset to null strings.
這篇文章中的資訊適用於:
機器翻譯重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,而非使用人工翻譯而成。Microsoft 同時提供使用者人工翻譯及機器翻譯兩個版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,機器翻譯的文章可能不盡完美。這些文章中也可能出現拼字、語意或文法上的錯誤,就像外國人在使用本國語言時可能發生的錯誤。Microsoft 不為內容的翻譯錯誤或客戶對該內容的使用所產生的任何錯誤或損害負責。Microsoft也同時將不斷地就機器翻譯軟體進行更新。 按一下這裡查看此文章的英文版本:73320?
(http://support.microsoft.com/kb/73320/en-us/
)
Microsoft及(或)其供應商不就任何在本伺服器上發表的文字資料及其相關圖表資訊的恰當性作任何承諾。所有文字資料及其相關圖表均以「現狀」供應,不負任何擔保責任。Microsoft及(或)其供應商謹此聲明,不負任何對與此資訊有關之擔保責任,包括關於適售性、適用於某一特定用途、權利或不侵權的明示或默示擔保責任。Microsoft及(或)其供應商無論如何不對因或與使用本伺服器上資訊或與資訊的實行有關而引起的契約、過失或其他侵權行為之訴訟中的特別的、間接的、衍生性的損害或任何因使用而喪失所導致的之損害、資料或利潤負任何責任。 | 其他資源 其他支援網站社群文章翻譯 |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email



回此頁最上方