如题所述
å¨å¼å§çæ¬æ以åï¼æå
说æä¸ä¸Cè¯è¨çå®è£
å使ç¨ä¸æåºè¯¥æ³¨æçå°æ¹ï¼
许å¤ç½åå¨ä¸è½½Turbo C 2.0åTurbo C++ 3.0åï¼åæé®å¾æå¤çæ¯å¨ä½¿ç¨è¿ç¨ä¸ç¢°å°å¦ä¸é®é¢ï¼
1ï¼åºç°æ¾ä¸å° stdio.h conio.hçincludeæ件ï¼
2ï¼åºç°cos.objæ æ³è¿æ¥ä¹ç±»çé误
è¿äºé®é¢æ¯ç±äºæ²¡æ设置好路å¾å¼èµ·çï¼ç®åä¸è½½çTC2ï¼TC3æå®è£ å类大æ¦æ两ç§çæ¬ï¼ä¸æ¯éè¿installå®è£ ï¼è¿ç±»åºè¯¥å·²ç»è®¾ç½®å¥½äºè·¯å¾ï¼äºæ¯ç´æ¥è§£åå建ç«TC.EXEçå¿«æ·æ¹å¼ï¼å¨WINDOWSä¸åå»å³å¯è¿è¡ï¼DOSä¸ç´æ¥è¿è¡TC.EXE),ç®åå½å 大å¤ä¸ºè¿ç§ï¼ï¼å 为å段æå°èªå·±ä¸ä¼ å¨269ç½ç»å®¶åçTC2è±æçæ¨èç»åå¤å®¶è½¯ä»¶ç«ï¼ï¼å æ¤ä¸è½½ä½¿ç¨å请注æè·¯å¾è®¾ç½®ï¼
设置æ¹æ³ä¸ºï¼ OPTION->DIRECTORIES:
INCLUDE: [TC2/3æå¨ç®å½]/include
LIB: [TC2/3æå¨ç®å½]/lib
outputè¾åºç®å½è¯·èªå·±è®¾ç½®ä¸ä¸ªå·¥ä½ç®å½ï¼ä»¥å æ··å¨ä¸èµ·ã
æåè¿æéä¸ç¹ï¼FILESä¸çChange dir(æ¹åå½åç®å½ï¼ä¸åºè®¾ç½®ä¸ºå½åç¨åºæå¨ç®å½ã
ï¼ä¸é¢çæ稿æ¥ç±ä¸æåæ¨èï¼å¨æ¤æè°¢ï¼
ä¸ãCè¯è¨çèµ·æº
C è¯è¨æ¯1972å¹´ç±ç¾å½çDennis Ritchie设计åæç, 并é¦æ¬¡å¨UNIXæä½ç³»ç»
ç DEC PDP-11 计ç®æºä¸ä½¿ç¨ã å®ç±æ©æçç¼ç¨è¯è¨ BCPL( Basic Combind
Programming Language) åå±æ¼åèæ¥ãå¨1970å¹´, AT&T è´å°å®éªå®¤ç Ken
Thompsonæ ¹æ®BCPLè¯è¨è®¾è®¡åºè¾å è¿ç并åå为 Bçè¯è¨, æå导äºC è¯è¨çé®ä¸ã
éçå¾®å计ç®æºçæ¥çæ®å, åºç°äºè®¸å¤C è¯è¨çæ¬ãç±äºæ²¡æç»ä¸çæ å,
使å¾è¿äºC è¯è¨ä¹é´åºç°äºä¸äºä¸ä¸è´çå°æ¹ã为äºæ¹åè¿ç§æ åµ, ç¾å½å½å®¶æ å
ç 究æ(ANSI)为C è¯è¨å¶å®äºä¸å¥ANSIæ å, æ为ç°è¡çCè¯è¨æ åã
äºãC è¯è¨çç¹ç¹
C è¯è¨åå±å¦æ¤è¿ é, èä¸æ为æå欢è¿çè¯è¨ä¹ä¸, 主è¦å 为å®å ·æ强大ç
åè½ã许å¤èåçç³»ç»è½¯ä»¶, å¦DBASE â ¢ PLUSãDBASE â £ é½æ¯ç±C è¯è¨ç¼åçã
ç¨C è¯è¨å ä¸ä¸äºæ±ç¼è¯è¨åç¨åº, å°±æ´è½æ¾ç¤ºC è¯è¨çä¼å¿äº, 象PC- DOS ã
WORDSTARçå°±æ¯ç¨è¿ç§æ¹æ³ç¼åçãå½çº³èµ·æ¥C è¯è¨å ·æä¸åç¹ç¹:
1. Cæ¯ä¸çº§è¯è¨
å®æé«çº§è¯è¨çåºæ¬ç»æåè¯å¥ä¸ä½çº§è¯è¨çå®ç¨æ§ç»åèµ·æ¥ãC è¯è¨å¯ä»¥è±¡
æ±ç¼è¯è¨ä¸æ ·å¯¹ä½ãåèåå°åè¿è¡æä½, èè¿ä¸è æ¯è®¡ç®æºæåºæ¬çå·¥ä½åå ã
2. Cæ¯ç»æå¼è¯è¨
ç»æå¼è¯è¨çæ¾èç¹ç¹æ¯ä»£ç åæ°æ®çåéå, å³ç¨åºçå个é¨åé¤äºå¿ è¦ç
ä¿¡æ¯äº¤æµå¤å½¼æ¤ç¬ç«ãè¿ç§ç»æåæ¹å¼å¯ä½¿ç¨åºå±æ¬¡æ¸ æ°, 便äºä½¿ç¨ãç»´æ¤ä»¥åè°
è¯ãC è¯è¨æ¯ä»¥å½æ°å½¢å¼æä¾ç»ç¨æ·ç, è¿äºå½æ°å¯æ¹ä¾¿çè°ç¨, å¹¶å ·æå¤ç§å¾ª
ç¯ãæ¡ä»¶è¯å¥æ§å¶ç¨åºæµå, ä»è使ç¨åºå®å ¨ç»æåã
3. Cè¯è¨åè½é½å ¨
C è¯è¨å ·æåç§åæ ·çæ°æ®ç±»å, 并å¼å ¥äºæéæ¦å¿µ, å¯ä½¿ç¨åºæçæ´é«ãå¦
å¤C è¯è¨ä¹å ·æ强大çå¾å½¢åè½, æ¯æå¤ç§æ¾ç¤ºå¨å驱å¨å¨ãèä¸è®¡ç®åè½ãé»è¾
å¤æåè½ä¹æ¯è¾å¼ºå¤§, å¯ä»¥å®ç°å³çç®çã
4. Cè¯è¨éç¨èå´å¤§
C è¯è¨è¿æä¸ä¸ªçªåºçä¼ç¹å°±æ¯éåäºå¤ç§æä½ç³»ç», å¦DOSãUNIX,ä¹éç¨äº
å¤ç§æºåã
ä¸ã Turbo C æ¦è¿°
1 Turbo C ç产çä¸åå±
Turbo C æ¯ç¾å½Borland å ¬å¸ç产å,Borlandå ¬å¸æ¯ä¸å®¶ä¸é¨ä»äºè½¯ä»¶å¼åã
ç å¶çå¤§å ¬å¸ãè¯¥å ¬å¸ç¸ç»§æ¨åºäºä¸å¥ Turboç³»å软件, å¦Turbo BASIC, Turbo
Pascal, Turbo Prolog, è¿äºè½¯ä»¶å¾åç¨æ·æ¬¢è¿ãè¯¥å ¬å¸å¨1987å¹´é¦æ¬¡æ¨åºTurbo
C 1.0 产å, å ¶ä¸ä½¿ç¨äºå ¨ç¶ä¸æ°çéæå¼åç¯å¢, å³ä½¿ç¨äºä¸ç³»åä¸æå¼èå,
å°ææ¬ç¼è¾ãç¨åºç¼è¯ãè¿æ¥ä»¥åç¨åºè¿è¡ä¸ä½å, 大大æ¹ä¾¿äºç¨åºçå¼åã1988
å¹´, Borland å ¬å¸åæ¨åºTurbo C1.5çæ¬, å¢å äºå¾å½¢åºåææ¬çªå£å½æ°åºç, è
Turbo C 2.0 åæ¯è¯¥å ¬å¸1989å¹´åºççãTurbo C2.0å¨åæ¥éæå¼åç¯å¢çåºç¡ä¸
å¢å äºæ¥éåè½, 并å¯ä»¥å¨Tiny模å¼ä¸ç´æ¥çæ.COM (æ°æ®ã代ç ãå æ å¤å¨åä¸
64K å åä¸) æ件ãè¿å¯å¯¹æ°å¦åå¤çå¨ (æ¯æ8087/80287/80387ç)è¿è¡ä»¿çã
Borland å ¬å¸åæ¥åæ¨åºäºé¢å对象çç¨åºè½¯ä»¶å Turbo C++, å®ç»§æ¿åå±
Turbo C 2.0 çéæå¼åç¯å¢, 并å å«äºé¢å对象çåºæ¬ææ³å设计æ¹æ³ã
1991年为äºéç¨Microsoft å ¬å¸çWindows 3.0 çæ¬, Borland å ¬å¸åå°Turbo
C++ ä½äºæ´æ°, å³Turbo C çæ°ä¸ä»£äº§åBorlandc C++ä¹å·²ç»é®ä¸äºã
2 Turbo C 2.0åºæ¬é ç½®è¦æ±
Turbo C 2.0å¯è¿è¡äºIBM-PCç³»åå¾®æº, å æ¬XT, ATåIBM å ¼å®¹æºã æ¤æ¶è¦æ±
DOS 2.0ææ´é«çæ¬æ¯æ, 并è³å°éè¦448KçRAM, å¯å¨ä»»ä½å½©ãåè²80åçè§å¨ä¸
è¿è¡ãæ¯ææ°å¦åå¤çå¨è¯ç, ä¹å¯è¿è¡æµ®ç¹ä»¿ç, è¿å°å å¿«ç¨åºçæ§è¡ã
3 Turbo C 2.0å 容ç®ä»
Turbo C 2.0æå å¼ ä½å¯è½¯ç(æä¸¤å¼ é«å¯è½¯ç)ãä¸é¢å¯¹Turbo C 2.0ç主è¦æ
件ä½ä¸ç®åä»ç»:
INSTALL.EXE å®è£ ç¨åºæ件
TC.EXE éæç¼è¯
TCINST.EXE éæå¼åç¯å¢çé 置设置ç¨åº
TCHELP.TCH 帮å©æ件
THELP.COM 读åTCHELP.TCHçé©»çç¨åº
README å ³äºTurbo Cçä¿¡æ¯æ件
TCCONFIG.EXE é ç½®æ件转æ¢ç¨åº
MAKE.EXE 项ç®ç®¡çå·¥å ·
TCC.EXE å½ä»¤è¡ç¼è¯
TLINK.EXE Turbo Cç³»åè¿æ¥å¨
TLIB.EXE Turbo Cç³»ååºç®¡çå·¥å ·
C0?.OBJ ä¸å模å¼å¯å¨ä»£ç
C?.LIB ä¸å模å¼è¿è¡åº
GRAPHICS.LIB å¾å½¢åº
EMU.LIB 8087仿çåº
FP87.LIB 8087åº
*.H Turbo C头æ件
*.BGI ä¸åæ¾ç¤ºå¨å¾å½¢é©±å¨ç¨åº
*.C Turbo Cä¾è¡ç¨åº(æºæ件)
å ¶ä¸: ä¸é¢ç?åå«ä¸º:
T Tiny(å¾®å模å¼)
S Small(å°æ¨¡å¼)
C Compact(ç´§å模å¼)
M Medium(ä¸å模å¼)
L Large(大模å¼)
H Huge(巨大模å¼)
åã Turbo C 2.0çå®è£ åå¯å¨
Turbo C 2.0çå®è£ é常ç®å, åªè¦å°1#çæå ¥A驱å¨å¨ä¸, å¨DOSç"A>" ä¸é®
å ¥:
A>INSTALL
å³å¯, æ¤æ¶å±å¹ä¸æ¾ç¤ºä¸ç§éæ©:
1. å¨ç¡¬çä¸åé ä¸ä¸ªæ°ç®å½æ¥å®è£ æ´ä¸ªTurbo C 2.0ç³»ç»ã
2. 对Turbo C 1.5æ´æ°çæ¬ã
è¿æ ·çå®è£ å°ä¿çåæ¥å¯¹éæ©é¡¹ãé¢è²åç¼è¾åè½é®ç设置ã
3. 为åªæ两个软çèæ 硬ççç³»ç»å®è£ Turbo C 2.0ã
è¿éåå®æ第ä¸ç§éæ©è¿è¡å®è£ , åªè¦å¨å®è£ è¿ç¨ä¸æ对çå·çæ示, 顺åºæ
å ¥å个软ç, å°±å¯ä»¥é¡ºå©å°è¿è¡å®è£ , å®è£ å®æ¯å°å¨Cçæ ¹ç®å½ä¸å»ºç«ä¸ä¸ªTC åç®
å½, TCä¸è¿å»ºç«äºä¸¤ä¸ªäºç®å½LIBåINCLUDE, LIBåç®å½ä¸åæ¾åºæ件, INCLUDE
åç®å½ä¸åæ¾ææ头æ件ã
è¿è¡Turbo C 2.0æ¶, åªè¦å¨TC åç®å½ä¸é®å ¥TC并å车å³å¯è¿å ¥Turbo C 2. 0
éæå¼åç¯å¢ã
äºã Turbo C 2.0éæå¼åç¯å¢ç使ç¨
è¿å ¥Turbo C 2.0éæå¼åç¯å¢ä¸å, å±å¹ä¸æ¾ç¤º:
ââââââââââââââââââââââââââââââ
File Edit Run Compile Project Options Debug Break/watch
âââââââââââââEditâââââââââââââââ
â Line 1 Col 1 Insert Indent Tab File Unindent c:NONAME.Câ
â â
â â
â â
â â
â â
â â
â â
ââââââââââMessageâââââââââââââââ â
â â
â â
ââââââââââââââââââââââââââââââ
F1-Help F5-Zoom F6-Switch F7-Trace F8-Step F9-Make F10-Menu
âââââââââââââââââââââââââââââââ
å ¶ä¸é¡¶ä¸ä¸è¡ä¸ºTurbo C 2.0 主èå, ä¸é´çªå£ä¸ºç¼è¾åº, æ¥ä¸æ¥æ¯ä¿¡æ¯çª
å£, æåºä¸ä¸è¡ä¸ºåèè¡ãè¿å个çªå£ææäºTurbo C 2.0ç主å±å¹, 以åçç¼ç¨ã
ç¼è¯ãè°è¯ä»¥åè¿è¡é½å°å¨è¿ä¸ªä¸»å±å¹ä¸è¿è¡ãä¸é¢è¯¦ç»ä»ç»ä¸»èåçå 容ã
1 主èå
主èå å¨Turbo C 2.0主å±å¹é¡¶ä¸ä¸è¡, æ¾ç¤ºä¸åå 容:
File Edit Run Compile Project Options Debug Break/watch
é¤Editå¤, å ¶å®å项åæåèå, åªè¦ç¨Altå ä¸æ项ä¸ç¬¬ä¸ä¸ªåæ¯(å³å¤§åå
æ¯), å°±å¯è¿å ¥è¯¥é¡¹çåèåä¸ã
ï¼1ï¼ãFile(æ件)èå
æAlt+Få¯è¿å ¥Fileèå, 该èåå æ¬ä»¥ä¸å 容:
.Load(å è½½)
è£ å ¥ä¸ä¸ªæ件, å¯ç¨ç±»ä¼¼DOSçéé 符(å¦*.C)æ¥è¿è¡å表éæ©ãä¹å¯è£ å ¥å ¶å®
æ©å±åçæ件, åªè¦ç»åºæ件å(æåªç»è·¯å¾)å³å¯ã该项ççé®ä¸ºF3, å³åªè¦å¨ä¸»
èåä¸æF3å³å¯è¿å ¥è¯¥é¡¹, èä¸éè¦å è¿å ¥Fileèååéæ¤é¡¹ã
.Pick(éæ©)
å°æè¿è£ å ¥ç¼è¾çªå£ç8个æ件åæä¸ä¸ªè¡¨è®©ç¨æ·éæ©, éæ©åå°è¯¥ç¨åºè£ å ¥
ç¼è¾åº, 并å°å æ ç½®å¨ä¸æ¬¡ä¿®æ¹è¿çå°æ¹ãå ¶çå¥ä¸ºAlt-F3ã
.New(æ°æ件)
说ææ件æ¯æ°ç, 缺çæ件å为NONAME.C, åçæ¶å¯æ¹åã
.Save(åç)
å°ç¼è¾åºä¸çæ件åç, è¥æ件åæ¯NONAME.Cæ¶, å°è¯¢é®æ¯å¦æ´æ¹æ件å, å ¶
çé®ä¸ºF2ã
.Write to(åç)
å¯ç±ç¨æ·ç»åºæ件åå°ç¼è¾åºä¸çæ件åç, è¥è¯¥æ件已åå¨, å询é®è¦ä¸è¦
è¦çã
.Directory(ç®å½)
æ¾ç¤ºç®å½åç®å½ä¸çæ件, 并å¯ç±ç¨æ·éæ©ã
.Change dir(æ¹åç®å½)
æ¾ç¤ºå½åç®å½, ç¨æ·å¯ä»¥æ¹åæ¾ç¤ºçç®å½ã
.Os shell(ææ¶éåº)
ææ¶éåºTurbo C 2.0å°DOSæ示符ä¸, æ¤æ¶å¯ä»¥è¿è¡DOS å½ä»¤, è¥æ³åå°
Turbo C 2.0ä¸, åªè¦å¨DOSç¶æä¸é®å ¥EXITå³å¯ã
.Quit(éåº)
éåºTurbo C 2.0, è¿åå°DOSæä½ç³»ç»ä¸, å ¶çé®ä¸ºAlt+Xã
说æ:
以ä¸å项å¯ç¨å æ é®ç§»å¨è²æ£è¿è¡éæ©, å车åæ§è¡ãä¹å¯ç¨æ¯ä¸é¡¹ç第ä¸ä¸ª
大ååæ¯ç´æ¥éæ©ãè¥è¦éå°ä¸»èåæä»å®çä¸ä¸çº§èåå表æ¡éååå¯ç¨Escé®,
Turbo C 2.0ææèååéç¨è¿ç§æ¹æ³è¿è¡æä½, 以ä¸ä¸å说æã
ï¼2ï¼ãEdit(ç¼è¾)èå
æAlt+Eå¯è¿å ¥ç¼è¾èå, è¥åå车, åå æ åºç°å¨ç¼è¾çªå£, æ¤æ¶ç¨æ·å¯ä»¥
è¿è¡ææ¬ç¼è¾ã
ç¼è¾æ¹æ³åºæ¬ä¸wordstarç¸å, å¯ç¨F1é®è·å¾æå ³ç¼è¾æ¹æ³ç帮å©ä¿¡æ¯ã
ä¸ç¼è¾æå ³çåè½é®å¦ä¸:
F1 è·å¾Turbo C 2.0ç¼è¾å½ä»¤ç帮å©ä¿¡æ¯
F5 æ©å¤§ç¼è¾çªå£å°æ´ä¸ªå±å¹
F6 å¨ç¼è¾çªå£ä¸ä¿¡æ¯çªå£ä¹é´è¿è¡åæ¢
F10 ä»ç¼è¾çªå£è½¬å°ä¸»èå
ç¼è¾å½ä»¤ç®ä»:
PageUp åå翻页
PageDn åå翻页
Home å°å æ 移å°æå¨è¡çå¼å§
End å°å æ 移å°æå¨è¡çç»å°¾
Ctrl+Y å é¤å æ æå¨çä¸è¡
Ctrl+T å é¤å æ æå¨å¤çä¸ä¸ªè¯
Ctrl+KB 设置åå¼å§
Ctrl+KK 设置åç»å°¾
Ctrl+KV å移å¨
Ctrl+KC åæ·è´
Ctrl+KY åå é¤
Ctrl+KR 读æ件
Ctrl+KW åæ件
Ctrl+KP åæ件æå°
Ctrl+F1 å¦æå æ æå¨å¤ä¸ºTurbo C 2.0åºå½æ°, åè·å¾æå ³è¯¥å½æ°ç帮å©
ä¿¡æ¯
Ctrl+Q[ æ¥æ¾Turbo C 2.0åç符çåå¹é 符
Ctrl+Q] æ¥æ¾Turbo C 2.0åç符çåå¹é 符
说æ:
a. Turbo C 2.0çåç符å æ¬ä»¥ä¸å ç§ç¬¦å·:
è±æ¬ç¬¦ {å}
å°æ¬ç¬¦ <å>
åæ¬ç¬¦ (å)
æ¹æ¬ç¬¦ [å]
注é符 /*å*/
åå¼å· "
åå¼å· '
b. Turbo C 2.0å¨ç¼è¾æ件æ¶è¿æä¸ç§åè½, å°±æ¯è½å¤èªå¨ç¼©è¿, å³å æ å®ä½
åä¸ä¸ä¸ªé空å符对é½ãå¨ç¼è¾çªå£ä¸, Ctrl+OL为èªå¨ç¼©è¿å¼å ³çæ§å¶é®ã
ï¼3ï¼Run(è¿è¡)èå
æAlt+Rå¯è¿å ¥Runèå, 该èåæ以ä¸å项:
.Run(è¿è¡ç¨åº)
è¿è¡ç±Project/Project name项æå®çæ件åæå½åç¼è¾åºçæ件ãå¦æ对ä¸
次ç¼è¯åçæºä»£ç æªåè¿ä¿®æ¹, åç´æ¥è¿è¡å°ä¸ä¸ä¸ªæç¹(没ææç¹åè¿è¡å°ç»æ)ã
å¦åå è¿è¡ç¼è¯ãè¿æ¥åæè¿è¡, å ¶çé®ä¸ºCtrl+F9ã
.Program reset(ç¨åºéå¯)
ä¸æ¢å½åçè°è¯, éæ¾åç»ç¨åºç空é´, å ¶çé®ä¸ºCtrl+F2ã
.Go to cursor(è¿è¡å°å æ å¤)
è°è¯ç¨åºæ¶ä½¿ç¨, éæ©è¯¥é¡¹å¯ä½¿ç¨åºè¿è¡å°å æ æå¨è¡ãå æ æå¨è¡å¿ 须为ä¸
æ¡å¯æ§è¡è¯å¥, å¦åæ示é误ãå ¶çé®ä¸ºF4ã
.Trace into(è·è¸ªè¿å ¥)
å¨æ§è¡ä¸æ¡è°ç¨å ¶å®ç¨æ·å®ä¹çåå½æ°æ¶, è¥ç¨Trace into项, åæ§è¡é¿æ¡å°
è·è¸ªå°è¯¥åå½æ°å é¨å»æ§è¡, å ¶çé®ä¸ºF7ã
.Step over(åæ¥æ§è¡)
æ§è¡å½åå½æ°çä¸ä¸æ¡è¯å¥, å³ä½¿ç¨æ·å½æ°è°ç¨, æ§è¡é¿æ¡ä¹ä¸ä¼è·è¸ªè¿å½æ°
å é¨, å ¶çé®ä¸ºF8ã
.User screen(ç¨æ·å±å¹)
æ¾ç¤ºç¨åºè¿è¡æ¶å¨å±å¹ä¸æ¾ç¤ºçç»æãå ¶çé®ä¸ºAlt+F5ã
(4)ãCompile(ç¼è¯)èå
æAlt+Cå¯è¿å ¥Compileèå, 该èåæ以ä¸å 个å 容:
.Compile to OBJ(ç¼è¯çæç®æ ç )
å°ä¸ä¸ªCæºæ件ç¼è¯çæ.OBJç®æ æ件, åæ¶æ¾ç¤ºçæçæ件åãå ¶çé®ä¸º
Alt+F9ã
.Make EXE file(çææ§è¡æ件)
æ¤å½ä»¤çæä¸ä¸ª.EXEçæ件, 并æ¾ç¤ºçæç.EXEæ件åãå ¶ä¸.EXEæ件åæ¯ä¸
é¢å 项ä¹ä¸ã
a. ç±Project/Project name说æç项ç®æ件åã
b. è¥æ²¡æ项ç®æ件å, åç±Primary C file说æçæºæ件ã
c. è¥ä»¥ä¸ä¸¤é¡¹é½æ²¡ææ件å, å为å½åçªå£çæ件åã
.Link EXE file(è¿æ¥çææ§è¡æ件)
æå½å.OBJæ件ååºæ件è¿æ¥å¨ä¸èµ·çæ.EXEæ件ã
.Build all(建ç«æææ件)
éæ°ç¼è¯é¡¹ç®éçæææ件, 并è¿è¡è£ é çæ.EXEæ件ã该å½ä»¤ä¸ä½è¿æ¶æ£æ¥
(ä¸é¢çå æ¡å½ä»¤è¦ä½è¿æ¶æ£æ¥, å³å¦æç®å项ç®éæºæ件çæ¥æåæ¶é´ä¸ç®æ æ
件ç¸åææ´æ©, åæç»å¯¹æºæ件è¿è¡ç¼è¯)ã
.Primary C file(主Cæ件)
å½å¨è¯¥é¡¹ä¸æå®äºä¸»æ件å, å¨ä»¥åçç¼è¯ä¸, å¦æ²¡æ项ç®æ件ååç¼è¯æ¤é¡¹
ä¸è§å®ç主Cæ件, å¦æç¼è¯ä¸æé误, åå°æ¤æ件è°å ¥ç¼è¾çªå£, ä¸ç®¡ç®åçªå£
ä¸æ¯ä¸æ¯ä¸»Cæ件ã
.Get info(è·å¾æå ³å½åè·¯å¾ãæºæ件åãæºæ件åè大å°ãç¼è¯ä¸çé误æ°
ç®ãå¯ç¨ç©ºé´çä¿¡æ¯ã
(5)ãProject(项ç®)èå
æAlt+På¯è¿å ¥Projectèå, 该èåå æ¬ä»¥ä¸å 容:
.Project name(项ç®å)
项ç®åå ·æ.PRJçæ©å±å, å ¶ä¸å æ¬å°è¦ç¼è¯ãè¿æ¥çæ件åãä¾å¦æä¸ä¸ªç¨
åºç±file1.c, file2.c, file3.cç»æ, è¦å°è¿3个æ件ç¼è¯è£ é æä¸ä¸ªfile.exeç
æ§è¡æ件, å¯ä»¥å 建ç«ä¸ä¸ªfile.prjç项ç®æ件, å ¶å 容å¦ä¸:
file1.c
file2.c
file3.c
æ¤æ¶å°file.prjæ¾å ¥Project name项ä¸, 以åè¿è¡ç¼è¯æ¶å°èªå¨å¯¹é¡¹ç®æ件ä¸
è§å®çä¸ä¸ªæºæ件åå«è¿è¡ç¼è¯ãç¶åè¿æ¥æfile.exeæ件ã
å¦æå ¶ä¸æäºæ件已ç»ç¼è¯æ.OBJæ件, èå没æä¿®æ¹è¿, å¯ç´æ¥åä¸.OBJæ©
å±åãæ¤æ¶å°ä¸åç¼è¯èåªè¿è¡è¿æ¥ã
ä¾å¦: file1.obj
file2.c
file3.c
å°ä¸å¯¹file1.cè¿è¡ç¼è¯, èç´æ¥è¿æ¥ã
说æ:
å½é¡¹ç®æ件ä¸çæ¯ä¸ªæ件æ æ©å±åæ¶, åææºæä»¶å¯¹å¾ , å¦å¤, å ¶ä¸çæ件ä¹
å¯ä»¥æ¯åºæ件, ä½å¿ é¡»åä¸æ©å±å.LIBã
.Break make on(ä¸æ¢ç¼è¯)
ç±ç¨æ·éæ©æ¯å¦å¨æWarining(è¦å)ãErrors(é误)ãFatal Errors( è´å½é
误)æ¶æLink(è¿æ¥)ä¹åéåºMakeç¼è¯ã
.Auto dependencies(èªå¨ä¾èµ)
å½å¼å ³ç½®ä¸ºon, ç¼è¯æ¶å°æ£æ¥æºæ件ä¸å¯¹åºç.OBJæ件æ¥æåæ¶é´, å¦åä¸è¿
è¡æ£æ¥ã
.Clear project(æ¸ é¤é¡¹ç®æ件)
æ¸ é¤Project/Project nameä¸ç项ç®æ件åã
.Remove messages(å é¤ä¿¡æ¯)
æé误信æ¯ä»ä¿¡æ¯çªå£ä¸æ¸ é¤æã
(6)ãOptions(éæ©èå)
æAlt+Oå¯è¿å ¥Optionsèå, 该èå对åå¦è æ¥è¯´è¦è°¨æ 使ç¨ã
.Compiler(ç¼è¯å¨)
æ¬é¡¹éæ©åæ许å¤åèå, å¯ä»¥è®©ç¨æ·éæ©ç¡¬ä»¶é ç½®ãåå¨æ¨¡åãè°è¯ææ¯ã
代ç ä¼åã对è¯ä¿¡æ¯æ§å¶åå®å®ä¹ãè¿äºåèåå¦ä¸:
Model
å ±æTiny, small, medium, compact, large, huge å ç§ä¸å模å¼å¯ç±åæ·é
æ©ã
Define
æå¼ä¸ä¸ªå®å®ä¹æ¡, åæ·å¯è¾å ¥å®å®ä¹ãå¤éå®ä¹å¯ååå·, èµå¼å¯ç¨çå·ã
Code generation
å®åæ许å¤ä»»é项, è¿äºä»»é项åè¯ç¼è¯å¨äº§çä»ä¹æ ·çç®æ 代ç ã
Calling convention å¯éæ©CæPascalæ¹å¼ä¼ éåæ°ã
Instruction set å¯éæ©8088/8086æ80186/80286æ令系åã
Floating point å¯éæ©ä»¿çæµ®ç¹ãæ°å¦åå¤çå¨æµ®ç¹ææ æµ®ç¹è¿ç®ã
Default char type è§å®charçç±»åã
Alignonent è§å®å°å对åååã
Merge duplicate strings ä½ä¼åç¨, å°éå¤çå符串å并å¨ä¸èµ·ã
Standard stack frame 产çä¸ä¸ªæ åçæ ç»æã
Test stack overflow 产çä¸æ®µç¨åºè¿è¡æ¶æ£æµå æ 溢åºç代ç ã
Line number å¨.OBJæ件ä¸æ¾è¿è¡å·ä»¥ä¾è°è¯æ¶ç¨ã
OBJ debug information å¨.OBJæ件ä¸äº§çè°è¯ä¿¡æ¯ã
Optimization
Optimize for éæ©æ¯å¯¹ç¨åºå°ååè¿æ¯å¯¹ç¨åºé度è¿è¡ä¼
åå¤çã
Use register variable ç¨æ¥éæ©æ¯å¦å 许使ç¨å¯åå¨åéã
Register optimization å°½å¯è½ä½¿ç¨å¯åå¨åé以åå°è¿å¤çåæ°æ
ä½ã
Jump optimization éè¿å»é¤å¤ä½ç跳转åè°æ´å¾ªç¯ä¸å¼å ³è¯å¥
çåæ³, å缩代ç ã
Source
Indentifier length 说ææ è¯ç¬¦ææå符ç个æ°, é»è®¤ä¸º32个ã
Nested comments æ¯å¦å 许åµå¥æ³¨éã
ANSI keywords only æ¯åªå 许ANSIå ³é®åè¿æ¯ä¹å 许Turbo C
2.0å ³é®å
Error
Error stop after å¤å°ä¸ªé误æ¶åæ¢ç¼è¯, é»è®¤ä¸º25个ã
Warning stop after å¤å°ä¸ªè¦åé误æ¶åæ¢ç¼è¯, é»è®¤ä¸º100个ã
Display warning
Portability warning 移æ¤æ§è¦åé误ã
ANSI Violations ä¾µç¯äºANSIå ³é®åçè¦åé误ã
Common error 常è§çè¦åé误ã
Less common error å°è§çè¦åé误ã
Names ç¨äºæ¹å段(segment)ã ç»( group) åç±»
(class)çåå, é»è®¤å¼ä¸ºCODE,DATA,BSSã
.Linker(è¿æ¥å¨)
æ¬èå设置æå ³è¿æ¥çéæ©é¡¹, å®æ以ä¸å 容:
Map file menu éæ©æ¯å¦äº§ç.MAPæ件ã
Initialize segments æ¯å¦å¨è¿æ¥æ¶åå§å没æåå§åç段ã
Devault libraries æ¯å¦å¨è¿æ¥å ¶å®ç¼è¯ç¨åºäº§ççç®æ æ件æ¶å»å¯»
æ¾å ¶ç¼ºçåºã
Graphics library æ¯å¦è¿æ¥graphicsåºä¸çå½æ°ã
Warn duplicate symbols å½æéå¤ç¬¦å·æ¶äº§çè¦åä¿¡æ¯ã
Stack warinig æ¯å¦è®©è¿æ¥ç¨åºäº§çNo stackçè¦åä¿¡æ¯ã
Case-sensitive link æ¯å¦åºå大ãå°ååã
.Environment(ç¯å¢)
æ¬èåè§å®æ¯å¦å¯¹æäºæ件èªå¨åçåå¶è¡¨é®åå±å¹å¤§å°ç设置
Message tracking
Current file è·è¸ªå¨ç¼è¾çªå£ä¸çæ件é误ã
All files è·è¸ªæææ件é误ã
Off ä¸è·è¸ªã
Keep message ç¼è¯åæ¯å¦æ¸ é¤Messageçªå£ä¸çä¿¡æ¯ã
Config auto save éonæ¶, å¨Run, Shellæéåºéæå¼åç¯å¢ä¹å,
å¦æTurbo C 2.0çé 置被æ¹è¿, åæåçæ¹å¨
å°åå ¥é ç½®æ件ä¸ãéoffæ¶ä¸åã
Edit auto save æ¯å¦å¨RunæShellä¹å, èªå¨åå¨ç¼è¾çæºæ件ã
Backup file æ¯å¦å¨æºæ件åçæ¶äº§çåå¤æ件(.BAKæ件)ã
Tab size 设置å¶è¡¨é®å¤§å°, é»è®¤ä¸º8ã
Zoomed windows å°ç°è¡æ´»å¨çªå£æ¾å¤§å°æ´ä¸ªå±å¹, å ¶çé®ä¸ºF5ã
Screen size 设置å±å¹ææ¬å¤§å°ã
.Directories(è·¯å¾)
è§å®ç¼è¯ãè¿æ¥æéæ件çè·¯å¾, æä¸åå项:
Include directories å å«æ件çè·¯å¾, å¤ä¸ªåç®å½ç¨";"åå¼ã
Library directories åºæ件路å¾, å¤ä¸ªåç®å½ç¨";"åå¼ã
Output directoried è¾åºæ件(.OBJ, .EXE, .MAPæ件)çç®å½ã
Turbo C directoried Turbo C æå¨çç®å½ã
Pick file name å®ä¹å è½½çpickæ件å, å¦ä¸å®ä¹åä»current
pick fileä¸åã
.Arguments(å½ä»¤è¡åæ°)
å 许ç¨æ·ä½¿ç¨å½ä»¤è¡åæ°ã
.Save options(åå¨é ç½®)
ä¿åææéæ©çç¼è¯ãè¿æ¥ãè°è¯å项ç®å°é ç½®æ件ä¸, 缺ççé ç½®æ件为
TCCONFIG.TCã
.Retrive options
è£ å ¥ä¸ä¸ªé ç½®æ件å°TCä¸, TCå°ä½¿ç¨è¯¥æ件çéæ©é¡¹ã
(7)ãDebug(è°è¯)èå
æAlt+Då¯éæ©Debugèå, 该èå主è¦ç¨äºæ¥é, å®å æ¬ä»¥ä¸å 容:
Evaluate
Expression è¦è®¡ç®ç»æç表达å¼ã
Result æ¾ç¤ºè¡¨è¾¾å¼ç计ç®ç»æã
New value èµç»æ°å¼ã
Call stack 该项ä¸å¯æ¥è§¦ãèå¨Turbo C debuger æ¶ç¨äºæ£
æ¥å æ æ åµã
Find function å¨è¿è¡Turbo C debuggeræ¶ç¨äºæ¾ç¤ºè§å®çå½æ°ã
Refresh display å¦æç¼è¾çªå£å¶ç¶è¢«ç¨æ·çªå£éåäºå¯ç¨æ¤æ¢å¤
ç¼è¾çªå£çå 容ã
(8)ãBreak/watch(æç¹åçè§è¡¨è¾¾å¼)
æAlt+Bå¯è¿å ¥Break/watchèå, 该èåæ以ä¸å 容:
Add watch åçè§çªå£æå ¥ä¸çè§è¡¨è¾¾å¼ã
Delete watch ä»çè§çªå£ä¸å é¤å½åççè§è¡¨è¾¾å¼ã
Edit watch å¨çè§çªå£ä¸ç¼è¾ä¸ä¸ªçè§è¡¨è¾¾å¼ã
Remove all watches ä»çè§çªå£ä¸å é¤ææççè§è¡¨è¾¾å¼ã
Toggle breakpoint 对å æ æå¨çè¡è®¾ç½®ææ¸ é¤æç¹ã
Clear all breakpoints æ¸ é¤æææç¹ã
View next breakpoint å°å æ 移å¨å°ä¸ä¸ä¸ªæç¹å¤ã
å Turbo C 2.0çé ç½®æ件
æè°é ç½®æ件æ¯å å«Turbo C 2.0æå ³ä¿¡æ¯çæ件, å ¶ä¸åæç¼è¯ãè¿æ¥çé
æ©åè·¯å¾çä¿¡æ¯ã
å¯ä»¥ç¨ä¸è¿°æ¹æ³å»ºç«Turbo C 2.0çé ç½®:
1. 建ç«ç¨æ·èªå½åçé ç½®æ件
å¯ä»¥ä»Optionsèåä¸éæ©Options/Save optionså½ä»¤, å°å½åéæå¼åç¯å¢
çææé ç½®åå ¥ä¸ä¸ªç±ç¨æ·å½åçé ç½®æ件ä¸ãä¸æ¬¡å¯å¨TCæ¶åªè¦å¨DOSä¸é®å ¥:
tc/c<ç¨æ·å½åçé ç½®æ件å>
å°±ä¼æè¿ä¸ªé ç½®æ件ä¸çå 容ä½ä¸ºTurbo C 2.0çéæ©ã
2. è¥è®¾ç½®Options/Environment/Config auto save 为on, åéåºéæå¼åç¯
å¢æ¶, å½åç设置ä¼èªå¨åæ¾å°Turbo C 2.0é ç½®æ件TCCONFIG.TCä¸ãTurbo C å¨
å¯å¨æ¶ä¼èªå¨å¯»æ¾è¿ä¸ªé ç½®æ件ã
3. ç¨TCINST设置Turbo Cçæå ³é ç½®, 并å°ç»æåå ¥TC.EXEä¸ãTurbo C å¨å¯
å¨æ¶, è¥æ²¡ææ¾å°é ç½®æ件, ååTC.EXEä¸ç缺çå¼ã
许å¤ç½åå¨ä¸è½½Turbo C 2.0åTurbo C++ 3.0åï¼åæé®å¾æå¤çæ¯å¨ä½¿ç¨è¿ç¨ä¸ç¢°å°å¦ä¸é®é¢ï¼
1ï¼åºç°æ¾ä¸å° stdio.h conio.hçincludeæ件ï¼
2ï¼åºç°cos.objæ æ³è¿æ¥ä¹ç±»çé误
è¿äºé®é¢æ¯ç±äºæ²¡æ设置好路å¾å¼èµ·çï¼ç®åä¸è½½çTC2ï¼TC3æå®è£ å类大æ¦æ两ç§çæ¬ï¼ä¸æ¯éè¿installå®è£ ï¼è¿ç±»åºè¯¥å·²ç»è®¾ç½®å¥½äºè·¯å¾ï¼äºæ¯ç´æ¥è§£åå建ç«TC.EXEçå¿«æ·æ¹å¼ï¼å¨WINDOWSä¸åå»å³å¯è¿è¡ï¼DOSä¸ç´æ¥è¿è¡TC.EXE),ç®åå½å 大å¤ä¸ºè¿ç§ï¼ï¼å 为å段æå°èªå·±ä¸ä¼ å¨269ç½ç»å®¶åçTC2è±æçæ¨èç»åå¤å®¶è½¯ä»¶ç«ï¼ï¼å æ¤ä¸è½½ä½¿ç¨å请注æè·¯å¾è®¾ç½®ï¼
设置æ¹æ³ä¸ºï¼ OPTION->DIRECTORIES:
INCLUDE: [TC2/3æå¨ç®å½]/include
LIB: [TC2/3æå¨ç®å½]/lib
outputè¾åºç®å½è¯·èªå·±è®¾ç½®ä¸ä¸ªå·¥ä½ç®å½ï¼ä»¥å æ··å¨ä¸èµ·ã
æåè¿æéä¸ç¹ï¼FILESä¸çChange dir(æ¹åå½åç®å½ï¼ä¸åºè®¾ç½®ä¸ºå½åç¨åºæå¨ç®å½ã
ï¼ä¸é¢çæ稿æ¥ç±ä¸æåæ¨èï¼å¨æ¤æè°¢ï¼
ä¸ãCè¯è¨çèµ·æº
C è¯è¨æ¯1972å¹´ç±ç¾å½çDennis Ritchie设计åæç, 并é¦æ¬¡å¨UNIXæä½ç³»ç»
ç DEC PDP-11 计ç®æºä¸ä½¿ç¨ã å®ç±æ©æçç¼ç¨è¯è¨ BCPL( Basic Combind
Programming Language) åå±æ¼åèæ¥ãå¨1970å¹´, AT&T è´å°å®éªå®¤ç Ken
Thompsonæ ¹æ®BCPLè¯è¨è®¾è®¡åºè¾å è¿ç并åå为 Bçè¯è¨, æå导äºC è¯è¨çé®ä¸ã
éçå¾®å计ç®æºçæ¥çæ®å, åºç°äºè®¸å¤C è¯è¨çæ¬ãç±äºæ²¡æç»ä¸çæ å,
使å¾è¿äºC è¯è¨ä¹é´åºç°äºä¸äºä¸ä¸è´çå°æ¹ã为äºæ¹åè¿ç§æ åµ, ç¾å½å½å®¶æ å
ç 究æ(ANSI)为C è¯è¨å¶å®äºä¸å¥ANSIæ å, æ为ç°è¡çCè¯è¨æ åã
äºãC è¯è¨çç¹ç¹
C è¯è¨åå±å¦æ¤è¿ é, èä¸æ为æå欢è¿çè¯è¨ä¹ä¸, 主è¦å 为å®å ·æ强大ç
åè½ã许å¤èåçç³»ç»è½¯ä»¶, å¦DBASE â ¢ PLUSãDBASE â £ é½æ¯ç±C è¯è¨ç¼åçã
ç¨C è¯è¨å ä¸ä¸äºæ±ç¼è¯è¨åç¨åº, å°±æ´è½æ¾ç¤ºC è¯è¨çä¼å¿äº, 象PC- DOS ã
WORDSTARçå°±æ¯ç¨è¿ç§æ¹æ³ç¼åçãå½çº³èµ·æ¥C è¯è¨å ·æä¸åç¹ç¹:
1. Cæ¯ä¸çº§è¯è¨
å®æé«çº§è¯è¨çåºæ¬ç»æåè¯å¥ä¸ä½çº§è¯è¨çå®ç¨æ§ç»åèµ·æ¥ãC è¯è¨å¯ä»¥è±¡
æ±ç¼è¯è¨ä¸æ ·å¯¹ä½ãåèåå°åè¿è¡æä½, èè¿ä¸è æ¯è®¡ç®æºæåºæ¬çå·¥ä½åå ã
2. Cæ¯ç»æå¼è¯è¨
ç»æå¼è¯è¨çæ¾èç¹ç¹æ¯ä»£ç åæ°æ®çåéå, å³ç¨åºçå个é¨åé¤äºå¿ è¦ç
ä¿¡æ¯äº¤æµå¤å½¼æ¤ç¬ç«ãè¿ç§ç»æåæ¹å¼å¯ä½¿ç¨åºå±æ¬¡æ¸ æ°, 便äºä½¿ç¨ãç»´æ¤ä»¥åè°
è¯ãC è¯è¨æ¯ä»¥å½æ°å½¢å¼æä¾ç»ç¨æ·ç, è¿äºå½æ°å¯æ¹ä¾¿çè°ç¨, å¹¶å ·æå¤ç§å¾ª
ç¯ãæ¡ä»¶è¯å¥æ§å¶ç¨åºæµå, ä»è使ç¨åºå®å ¨ç»æåã
3. Cè¯è¨åè½é½å ¨
C è¯è¨å ·æåç§åæ ·çæ°æ®ç±»å, 并å¼å ¥äºæéæ¦å¿µ, å¯ä½¿ç¨åºæçæ´é«ãå¦
å¤C è¯è¨ä¹å ·æ强大çå¾å½¢åè½, æ¯æå¤ç§æ¾ç¤ºå¨å驱å¨å¨ãèä¸è®¡ç®åè½ãé»è¾
å¤æåè½ä¹æ¯è¾å¼ºå¤§, å¯ä»¥å®ç°å³çç®çã
4. Cè¯è¨éç¨èå´å¤§
C è¯è¨è¿æä¸ä¸ªçªåºçä¼ç¹å°±æ¯éåäºå¤ç§æä½ç³»ç», å¦DOSãUNIX,ä¹éç¨äº
å¤ç§æºåã
ä¸ã Turbo C æ¦è¿°
1 Turbo C ç产çä¸åå±
Turbo C æ¯ç¾å½Borland å ¬å¸ç产å,Borlandå ¬å¸æ¯ä¸å®¶ä¸é¨ä»äºè½¯ä»¶å¼åã
ç å¶çå¤§å ¬å¸ãè¯¥å ¬å¸ç¸ç»§æ¨åºäºä¸å¥ Turboç³»å软件, å¦Turbo BASIC, Turbo
Pascal, Turbo Prolog, è¿äºè½¯ä»¶å¾åç¨æ·æ¬¢è¿ãè¯¥å ¬å¸å¨1987å¹´é¦æ¬¡æ¨åºTurbo
C 1.0 产å, å ¶ä¸ä½¿ç¨äºå ¨ç¶ä¸æ°çéæå¼åç¯å¢, å³ä½¿ç¨äºä¸ç³»åä¸æå¼èå,
å°ææ¬ç¼è¾ãç¨åºç¼è¯ãè¿æ¥ä»¥åç¨åºè¿è¡ä¸ä½å, 大大æ¹ä¾¿äºç¨åºçå¼åã1988
å¹´, Borland å ¬å¸åæ¨åºTurbo C1.5çæ¬, å¢å äºå¾å½¢åºåææ¬çªå£å½æ°åºç, è
Turbo C 2.0 åæ¯è¯¥å ¬å¸1989å¹´åºççãTurbo C2.0å¨åæ¥éæå¼åç¯å¢çåºç¡ä¸
å¢å äºæ¥éåè½, 并å¯ä»¥å¨Tiny模å¼ä¸ç´æ¥çæ.COM (æ°æ®ã代ç ãå æ å¤å¨åä¸
64K å åä¸) æ件ãè¿å¯å¯¹æ°å¦åå¤çå¨ (æ¯æ8087/80287/80387ç)è¿è¡ä»¿çã
Borland å ¬å¸åæ¥åæ¨åºäºé¢å对象çç¨åºè½¯ä»¶å Turbo C++, å®ç»§æ¿åå±
Turbo C 2.0 çéæå¼åç¯å¢, 并å å«äºé¢å对象çåºæ¬ææ³å设计æ¹æ³ã
1991年为äºéç¨Microsoft å ¬å¸çWindows 3.0 çæ¬, Borland å ¬å¸åå°Turbo
C++ ä½äºæ´æ°, å³Turbo C çæ°ä¸ä»£äº§åBorlandc C++ä¹å·²ç»é®ä¸äºã
2 Turbo C 2.0åºæ¬é ç½®è¦æ±
Turbo C 2.0å¯è¿è¡äºIBM-PCç³»åå¾®æº, å æ¬XT, ATåIBM å ¼å®¹æºã æ¤æ¶è¦æ±
DOS 2.0ææ´é«çæ¬æ¯æ, 并è³å°éè¦448KçRAM, å¯å¨ä»»ä½å½©ãåè²80åçè§å¨ä¸
è¿è¡ãæ¯ææ°å¦åå¤çå¨è¯ç, ä¹å¯è¿è¡æµ®ç¹ä»¿ç, è¿å°å å¿«ç¨åºçæ§è¡ã
3 Turbo C 2.0å 容ç®ä»
Turbo C 2.0æå å¼ ä½å¯è½¯ç(æä¸¤å¼ é«å¯è½¯ç)ãä¸é¢å¯¹Turbo C 2.0ç主è¦æ
件ä½ä¸ç®åä»ç»:
INSTALL.EXE å®è£ ç¨åºæ件
TC.EXE éæç¼è¯
TCINST.EXE éæå¼åç¯å¢çé 置设置ç¨åº
TCHELP.TCH 帮å©æ件
THELP.COM 读åTCHELP.TCHçé©»çç¨åº
README å ³äºTurbo Cçä¿¡æ¯æ件
TCCONFIG.EXE é ç½®æ件转æ¢ç¨åº
MAKE.EXE 项ç®ç®¡çå·¥å ·
TCC.EXE å½ä»¤è¡ç¼è¯
TLINK.EXE Turbo Cç³»åè¿æ¥å¨
TLIB.EXE Turbo Cç³»ååºç®¡çå·¥å ·
C0?.OBJ ä¸å模å¼å¯å¨ä»£ç
C?.LIB ä¸å模å¼è¿è¡åº
GRAPHICS.LIB å¾å½¢åº
EMU.LIB 8087仿çåº
FP87.LIB 8087åº
*.H Turbo C头æ件
*.BGI ä¸åæ¾ç¤ºå¨å¾å½¢é©±å¨ç¨åº
*.C Turbo Cä¾è¡ç¨åº(æºæ件)
å ¶ä¸: ä¸é¢ç?åå«ä¸º:
T Tiny(å¾®å模å¼)
S Small(å°æ¨¡å¼)
C Compact(ç´§å模å¼)
M Medium(ä¸å模å¼)
L Large(大模å¼)
H Huge(巨大模å¼)
åã Turbo C 2.0çå®è£ åå¯å¨
Turbo C 2.0çå®è£ é常ç®å, åªè¦å°1#çæå ¥A驱å¨å¨ä¸, å¨DOSç"A>" ä¸é®
å ¥:
A>INSTALL
å³å¯, æ¤æ¶å±å¹ä¸æ¾ç¤ºä¸ç§éæ©:
1. å¨ç¡¬çä¸åé ä¸ä¸ªæ°ç®å½æ¥å®è£ æ´ä¸ªTurbo C 2.0ç³»ç»ã
2. 对Turbo C 1.5æ´æ°çæ¬ã
è¿æ ·çå®è£ å°ä¿çåæ¥å¯¹éæ©é¡¹ãé¢è²åç¼è¾åè½é®ç设置ã
3. 为åªæ两个软çèæ 硬ççç³»ç»å®è£ Turbo C 2.0ã
è¿éåå®æ第ä¸ç§éæ©è¿è¡å®è£ , åªè¦å¨å®è£ è¿ç¨ä¸æ对çå·çæ示, 顺åºæ
å ¥å个软ç, å°±å¯ä»¥é¡ºå©å°è¿è¡å®è£ , å®è£ å®æ¯å°å¨Cçæ ¹ç®å½ä¸å»ºç«ä¸ä¸ªTC åç®
å½, TCä¸è¿å»ºç«äºä¸¤ä¸ªäºç®å½LIBåINCLUDE, LIBåç®å½ä¸åæ¾åºæ件, INCLUDE
åç®å½ä¸åæ¾ææ头æ件ã
è¿è¡Turbo C 2.0æ¶, åªè¦å¨TC åç®å½ä¸é®å ¥TC并å车å³å¯è¿å ¥Turbo C 2. 0
éæå¼åç¯å¢ã
äºã Turbo C 2.0éæå¼åç¯å¢ç使ç¨
è¿å ¥Turbo C 2.0éæå¼åç¯å¢ä¸å, å±å¹ä¸æ¾ç¤º:
ââââââââââââââââââââââââââââââ
File Edit Run Compile Project Options Debug Break/watch
âââââââââââââEditâââââââââââââââ
â Line 1 Col 1 Insert Indent Tab File Unindent c:NONAME.Câ
â â
â â
â â
â â
â â
â â
â â
ââââââââââMessageâââââââââââââââ â
â â
â â
ââââââââââââââââââââââââââââââ
F1-Help F5-Zoom F6-Switch F7-Trace F8-Step F9-Make F10-Menu
âââââââââââââââââââââââââââââââ
å ¶ä¸é¡¶ä¸ä¸è¡ä¸ºTurbo C 2.0 主èå, ä¸é´çªå£ä¸ºç¼è¾åº, æ¥ä¸æ¥æ¯ä¿¡æ¯çª
å£, æåºä¸ä¸è¡ä¸ºåèè¡ãè¿å个çªå£ææäºTurbo C 2.0ç主å±å¹, 以åçç¼ç¨ã
ç¼è¯ãè°è¯ä»¥åè¿è¡é½å°å¨è¿ä¸ªä¸»å±å¹ä¸è¿è¡ãä¸é¢è¯¦ç»ä»ç»ä¸»èåçå 容ã
1 主èå
主èå å¨Turbo C 2.0主å±å¹é¡¶ä¸ä¸è¡, æ¾ç¤ºä¸åå 容:
File Edit Run Compile Project Options Debug Break/watch
é¤Editå¤, å ¶å®å项åæåèå, åªè¦ç¨Altå ä¸æ项ä¸ç¬¬ä¸ä¸ªåæ¯(å³å¤§åå
æ¯), å°±å¯è¿å ¥è¯¥é¡¹çåèåä¸ã
ï¼1ï¼ãFile(æ件)èå
æAlt+Få¯è¿å ¥Fileèå, 该èåå æ¬ä»¥ä¸å 容:
.Load(å è½½)
è£ å ¥ä¸ä¸ªæ件, å¯ç¨ç±»ä¼¼DOSçéé 符(å¦*.C)æ¥è¿è¡å表éæ©ãä¹å¯è£ å ¥å ¶å®
æ©å±åçæ件, åªè¦ç»åºæ件å(æåªç»è·¯å¾)å³å¯ã该项ççé®ä¸ºF3, å³åªè¦å¨ä¸»
èåä¸æF3å³å¯è¿å ¥è¯¥é¡¹, èä¸éè¦å è¿å ¥Fileèååéæ¤é¡¹ã
.Pick(éæ©)
å°æè¿è£ å ¥ç¼è¾çªå£ç8个æ件åæä¸ä¸ªè¡¨è®©ç¨æ·éæ©, éæ©åå°è¯¥ç¨åºè£ å ¥
ç¼è¾åº, 并å°å æ ç½®å¨ä¸æ¬¡ä¿®æ¹è¿çå°æ¹ãå ¶çå¥ä¸ºAlt-F3ã
.New(æ°æ件)
说ææ件æ¯æ°ç, 缺çæ件å为NONAME.C, åçæ¶å¯æ¹åã
.Save(åç)
å°ç¼è¾åºä¸çæ件åç, è¥æ件åæ¯NONAME.Cæ¶, å°è¯¢é®æ¯å¦æ´æ¹æ件å, å ¶
çé®ä¸ºF2ã
.Write to(åç)
å¯ç±ç¨æ·ç»åºæ件åå°ç¼è¾åºä¸çæ件åç, è¥è¯¥æ件已åå¨, å询é®è¦ä¸è¦
è¦çã
.Directory(ç®å½)
æ¾ç¤ºç®å½åç®å½ä¸çæ件, 并å¯ç±ç¨æ·éæ©ã
.Change dir(æ¹åç®å½)
æ¾ç¤ºå½åç®å½, ç¨æ·å¯ä»¥æ¹åæ¾ç¤ºçç®å½ã
.Os shell(ææ¶éåº)
ææ¶éåºTurbo C 2.0å°DOSæ示符ä¸, æ¤æ¶å¯ä»¥è¿è¡DOS å½ä»¤, è¥æ³åå°
Turbo C 2.0ä¸, åªè¦å¨DOSç¶æä¸é®å ¥EXITå³å¯ã
.Quit(éåº)
éåºTurbo C 2.0, è¿åå°DOSæä½ç³»ç»ä¸, å ¶çé®ä¸ºAlt+Xã
说æ:
以ä¸å项å¯ç¨å æ é®ç§»å¨è²æ£è¿è¡éæ©, å车åæ§è¡ãä¹å¯ç¨æ¯ä¸é¡¹ç第ä¸ä¸ª
大ååæ¯ç´æ¥éæ©ãè¥è¦éå°ä¸»èåæä»å®çä¸ä¸çº§èåå表æ¡éååå¯ç¨Escé®,
Turbo C 2.0ææèååéç¨è¿ç§æ¹æ³è¿è¡æä½, 以ä¸ä¸å说æã
ï¼2ï¼ãEdit(ç¼è¾)èå
æAlt+Eå¯è¿å ¥ç¼è¾èå, è¥åå车, åå æ åºç°å¨ç¼è¾çªå£, æ¤æ¶ç¨æ·å¯ä»¥
è¿è¡ææ¬ç¼è¾ã
ç¼è¾æ¹æ³åºæ¬ä¸wordstarç¸å, å¯ç¨F1é®è·å¾æå ³ç¼è¾æ¹æ³ç帮å©ä¿¡æ¯ã
ä¸ç¼è¾æå ³çåè½é®å¦ä¸:
F1 è·å¾Turbo C 2.0ç¼è¾å½ä»¤ç帮å©ä¿¡æ¯
F5 æ©å¤§ç¼è¾çªå£å°æ´ä¸ªå±å¹
F6 å¨ç¼è¾çªå£ä¸ä¿¡æ¯çªå£ä¹é´è¿è¡åæ¢
F10 ä»ç¼è¾çªå£è½¬å°ä¸»èå
ç¼è¾å½ä»¤ç®ä»:
PageUp åå翻页
PageDn åå翻页
Home å°å æ 移å°æå¨è¡çå¼å§
End å°å æ 移å°æå¨è¡çç»å°¾
Ctrl+Y å é¤å æ æå¨çä¸è¡
Ctrl+T å é¤å æ æå¨å¤çä¸ä¸ªè¯
Ctrl+KB 设置åå¼å§
Ctrl+KK 设置åç»å°¾
Ctrl+KV å移å¨
Ctrl+KC åæ·è´
Ctrl+KY åå é¤
Ctrl+KR 读æ件
Ctrl+KW åæ件
Ctrl+KP åæ件æå°
Ctrl+F1 å¦æå æ æå¨å¤ä¸ºTurbo C 2.0åºå½æ°, åè·å¾æå ³è¯¥å½æ°ç帮å©
ä¿¡æ¯
Ctrl+Q[ æ¥æ¾Turbo C 2.0åç符çåå¹é 符
Ctrl+Q] æ¥æ¾Turbo C 2.0åç符çåå¹é 符
说æ:
a. Turbo C 2.0çåç符å æ¬ä»¥ä¸å ç§ç¬¦å·:
è±æ¬ç¬¦ {å}
å°æ¬ç¬¦ <å>
åæ¬ç¬¦ (å)
æ¹æ¬ç¬¦ [å]
注é符 /*å*/
åå¼å· "
åå¼å· '
b. Turbo C 2.0å¨ç¼è¾æ件æ¶è¿æä¸ç§åè½, å°±æ¯è½å¤èªå¨ç¼©è¿, å³å æ å®ä½
åä¸ä¸ä¸ªé空å符对é½ãå¨ç¼è¾çªå£ä¸, Ctrl+OL为èªå¨ç¼©è¿å¼å ³çæ§å¶é®ã
ï¼3ï¼Run(è¿è¡)èå
æAlt+Rå¯è¿å ¥Runèå, 该èåæ以ä¸å项:
.Run(è¿è¡ç¨åº)
è¿è¡ç±Project/Project name项æå®çæ件åæå½åç¼è¾åºçæ件ãå¦æ对ä¸
次ç¼è¯åçæºä»£ç æªåè¿ä¿®æ¹, åç´æ¥è¿è¡å°ä¸ä¸ä¸ªæç¹(没ææç¹åè¿è¡å°ç»æ)ã
å¦åå è¿è¡ç¼è¯ãè¿æ¥åæè¿è¡, å ¶çé®ä¸ºCtrl+F9ã
.Program reset(ç¨åºéå¯)
ä¸æ¢å½åçè°è¯, éæ¾åç»ç¨åºç空é´, å ¶çé®ä¸ºCtrl+F2ã
.Go to cursor(è¿è¡å°å æ å¤)
è°è¯ç¨åºæ¶ä½¿ç¨, éæ©è¯¥é¡¹å¯ä½¿ç¨åºè¿è¡å°å æ æå¨è¡ãå æ æå¨è¡å¿ 须为ä¸
æ¡å¯æ§è¡è¯å¥, å¦åæ示é误ãå ¶çé®ä¸ºF4ã
.Trace into(è·è¸ªè¿å ¥)
å¨æ§è¡ä¸æ¡è°ç¨å ¶å®ç¨æ·å®ä¹çåå½æ°æ¶, è¥ç¨Trace into项, åæ§è¡é¿æ¡å°
è·è¸ªå°è¯¥åå½æ°å é¨å»æ§è¡, å ¶çé®ä¸ºF7ã
.Step over(åæ¥æ§è¡)
æ§è¡å½åå½æ°çä¸ä¸æ¡è¯å¥, å³ä½¿ç¨æ·å½æ°è°ç¨, æ§è¡é¿æ¡ä¹ä¸ä¼è·è¸ªè¿å½æ°
å é¨, å ¶çé®ä¸ºF8ã
.User screen(ç¨æ·å±å¹)
æ¾ç¤ºç¨åºè¿è¡æ¶å¨å±å¹ä¸æ¾ç¤ºçç»æãå ¶çé®ä¸ºAlt+F5ã
(4)ãCompile(ç¼è¯)èå
æAlt+Cå¯è¿å ¥Compileèå, 该èåæ以ä¸å 个å 容:
.Compile to OBJ(ç¼è¯çæç®æ ç )
å°ä¸ä¸ªCæºæ件ç¼è¯çæ.OBJç®æ æ件, åæ¶æ¾ç¤ºçæçæ件åãå ¶çé®ä¸º
Alt+F9ã
.Make EXE file(çææ§è¡æ件)
æ¤å½ä»¤çæä¸ä¸ª.EXEçæ件, 并æ¾ç¤ºçæç.EXEæ件åãå ¶ä¸.EXEæ件åæ¯ä¸
é¢å 项ä¹ä¸ã
a. ç±Project/Project name说æç项ç®æ件åã
b. è¥æ²¡æ项ç®æ件å, åç±Primary C file说æçæºæ件ã
c. è¥ä»¥ä¸ä¸¤é¡¹é½æ²¡ææ件å, å为å½åçªå£çæ件åã
.Link EXE file(è¿æ¥çææ§è¡æ件)
æå½å.OBJæ件ååºæ件è¿æ¥å¨ä¸èµ·çæ.EXEæ件ã
.Build all(建ç«æææ件)
éæ°ç¼è¯é¡¹ç®éçæææ件, 并è¿è¡è£ é çæ.EXEæ件ã该å½ä»¤ä¸ä½è¿æ¶æ£æ¥
(ä¸é¢çå æ¡å½ä»¤è¦ä½è¿æ¶æ£æ¥, å³å¦æç®å项ç®éæºæ件çæ¥æåæ¶é´ä¸ç®æ æ
件ç¸åææ´æ©, åæç»å¯¹æºæ件è¿è¡ç¼è¯)ã
.Primary C file(主Cæ件)
å½å¨è¯¥é¡¹ä¸æå®äºä¸»æ件å, å¨ä»¥åçç¼è¯ä¸, å¦æ²¡æ项ç®æ件ååç¼è¯æ¤é¡¹
ä¸è§å®ç主Cæ件, å¦æç¼è¯ä¸æé误, åå°æ¤æ件è°å ¥ç¼è¾çªå£, ä¸ç®¡ç®åçªå£
ä¸æ¯ä¸æ¯ä¸»Cæ件ã
.Get info(è·å¾æå ³å½åè·¯å¾ãæºæ件åãæºæ件åè大å°ãç¼è¯ä¸çé误æ°
ç®ãå¯ç¨ç©ºé´çä¿¡æ¯ã
(5)ãProject(项ç®)èå
æAlt+På¯è¿å ¥Projectèå, 该èåå æ¬ä»¥ä¸å 容:
.Project name(项ç®å)
项ç®åå ·æ.PRJçæ©å±å, å ¶ä¸å æ¬å°è¦ç¼è¯ãè¿æ¥çæ件åãä¾å¦æä¸ä¸ªç¨
åºç±file1.c, file2.c, file3.cç»æ, è¦å°è¿3个æ件ç¼è¯è£ é æä¸ä¸ªfile.exeç
æ§è¡æ件, å¯ä»¥å 建ç«ä¸ä¸ªfile.prjç项ç®æ件, å ¶å 容å¦ä¸:
file1.c
file2.c
file3.c
æ¤æ¶å°file.prjæ¾å ¥Project name项ä¸, 以åè¿è¡ç¼è¯æ¶å°èªå¨å¯¹é¡¹ç®æ件ä¸
è§å®çä¸ä¸ªæºæ件åå«è¿è¡ç¼è¯ãç¶åè¿æ¥æfile.exeæ件ã
å¦æå ¶ä¸æäºæ件已ç»ç¼è¯æ.OBJæ件, èå没æä¿®æ¹è¿, å¯ç´æ¥åä¸.OBJæ©
å±åãæ¤æ¶å°ä¸åç¼è¯èåªè¿è¡è¿æ¥ã
ä¾å¦: file1.obj
file2.c
file3.c
å°ä¸å¯¹file1.cè¿è¡ç¼è¯, èç´æ¥è¿æ¥ã
说æ:
å½é¡¹ç®æ件ä¸çæ¯ä¸ªæ件æ æ©å±åæ¶, åææºæä»¶å¯¹å¾ , å¦å¤, å ¶ä¸çæ件ä¹
å¯ä»¥æ¯åºæ件, ä½å¿ é¡»åä¸æ©å±å.LIBã
.Break make on(ä¸æ¢ç¼è¯)
ç±ç¨æ·éæ©æ¯å¦å¨æWarining(è¦å)ãErrors(é误)ãFatal Errors( è´å½é
误)æ¶æLink(è¿æ¥)ä¹åéåºMakeç¼è¯ã
.Auto dependencies(èªå¨ä¾èµ)
å½å¼å ³ç½®ä¸ºon, ç¼è¯æ¶å°æ£æ¥æºæ件ä¸å¯¹åºç.OBJæ件æ¥æåæ¶é´, å¦åä¸è¿
è¡æ£æ¥ã
.Clear project(æ¸ é¤é¡¹ç®æ件)
æ¸ é¤Project/Project nameä¸ç项ç®æ件åã
.Remove messages(å é¤ä¿¡æ¯)
æé误信æ¯ä»ä¿¡æ¯çªå£ä¸æ¸ é¤æã
(6)ãOptions(éæ©èå)
æAlt+Oå¯è¿å ¥Optionsèå, 该èå对åå¦è æ¥è¯´è¦è°¨æ 使ç¨ã
.Compiler(ç¼è¯å¨)
æ¬é¡¹éæ©åæ许å¤åèå, å¯ä»¥è®©ç¨æ·éæ©ç¡¬ä»¶é ç½®ãåå¨æ¨¡åãè°è¯ææ¯ã
代ç ä¼åã对è¯ä¿¡æ¯æ§å¶åå®å®ä¹ãè¿äºåèåå¦ä¸:
Model
å ±æTiny, small, medium, compact, large, huge å ç§ä¸å模å¼å¯ç±åæ·é
æ©ã
Define
æå¼ä¸ä¸ªå®å®ä¹æ¡, åæ·å¯è¾å ¥å®å®ä¹ãå¤éå®ä¹å¯ååå·, èµå¼å¯ç¨çå·ã
Code generation
å®åæ许å¤ä»»é项, è¿äºä»»é项åè¯ç¼è¯å¨äº§çä»ä¹æ ·çç®æ 代ç ã
Calling convention å¯éæ©CæPascalæ¹å¼ä¼ éåæ°ã
Instruction set å¯éæ©8088/8086æ80186/80286æ令系åã
Floating point å¯éæ©ä»¿çæµ®ç¹ãæ°å¦åå¤çå¨æµ®ç¹ææ æµ®ç¹è¿ç®ã
Default char type è§å®charçç±»åã
Alignonent è§å®å°å对åååã
Merge duplicate strings ä½ä¼åç¨, å°éå¤çå符串å并å¨ä¸èµ·ã
Standard stack frame 产çä¸ä¸ªæ åçæ ç»æã
Test stack overflow 产çä¸æ®µç¨åºè¿è¡æ¶æ£æµå æ 溢åºç代ç ã
Line number å¨.OBJæ件ä¸æ¾è¿è¡å·ä»¥ä¾è°è¯æ¶ç¨ã
OBJ debug information å¨.OBJæ件ä¸äº§çè°è¯ä¿¡æ¯ã
Optimization
Optimize for éæ©æ¯å¯¹ç¨åºå°ååè¿æ¯å¯¹ç¨åºé度è¿è¡ä¼
åå¤çã
Use register variable ç¨æ¥éæ©æ¯å¦å 许使ç¨å¯åå¨åéã
Register optimization å°½å¯è½ä½¿ç¨å¯åå¨åé以åå°è¿å¤çåæ°æ
ä½ã
Jump optimization éè¿å»é¤å¤ä½ç跳转åè°æ´å¾ªç¯ä¸å¼å ³è¯å¥
çåæ³, å缩代ç ã
Source
Indentifier length 说ææ è¯ç¬¦ææå符ç个æ°, é»è®¤ä¸º32个ã
Nested comments æ¯å¦å 许åµå¥æ³¨éã
ANSI keywords only æ¯åªå 许ANSIå ³é®åè¿æ¯ä¹å 许Turbo C
2.0å ³é®å
Error
Error stop after å¤å°ä¸ªé误æ¶åæ¢ç¼è¯, é»è®¤ä¸º25个ã
Warning stop after å¤å°ä¸ªè¦åé误æ¶åæ¢ç¼è¯, é»è®¤ä¸º100个ã
Display warning
Portability warning 移æ¤æ§è¦åé误ã
ANSI Violations ä¾µç¯äºANSIå ³é®åçè¦åé误ã
Common error 常è§çè¦åé误ã
Less common error å°è§çè¦åé误ã
Names ç¨äºæ¹å段(segment)ã ç»( group) åç±»
(class)çåå, é»è®¤å¼ä¸ºCODE,DATA,BSSã
.Linker(è¿æ¥å¨)
æ¬èå设置æå ³è¿æ¥çéæ©é¡¹, å®æ以ä¸å 容:
Map file menu éæ©æ¯å¦äº§ç.MAPæ件ã
Initialize segments æ¯å¦å¨è¿æ¥æ¶åå§å没æåå§åç段ã
Devault libraries æ¯å¦å¨è¿æ¥å ¶å®ç¼è¯ç¨åºäº§ççç®æ æ件æ¶å»å¯»
æ¾å ¶ç¼ºçåºã
Graphics library æ¯å¦è¿æ¥graphicsåºä¸çå½æ°ã
Warn duplicate symbols å½æéå¤ç¬¦å·æ¶äº§çè¦åä¿¡æ¯ã
Stack warinig æ¯å¦è®©è¿æ¥ç¨åºäº§çNo stackçè¦åä¿¡æ¯ã
Case-sensitive link æ¯å¦åºå大ãå°ååã
.Environment(ç¯å¢)
æ¬èåè§å®æ¯å¦å¯¹æäºæ件èªå¨åçåå¶è¡¨é®åå±å¹å¤§å°ç设置
Message tracking
Current file è·è¸ªå¨ç¼è¾çªå£ä¸çæ件é误ã
All files è·è¸ªæææ件é误ã
Off ä¸è·è¸ªã
Keep message ç¼è¯åæ¯å¦æ¸ é¤Messageçªå£ä¸çä¿¡æ¯ã
Config auto save éonæ¶, å¨Run, Shellæéåºéæå¼åç¯å¢ä¹å,
å¦æTurbo C 2.0çé 置被æ¹è¿, åæåçæ¹å¨
å°åå ¥é ç½®æ件ä¸ãéoffæ¶ä¸åã
Edit auto save æ¯å¦å¨RunæShellä¹å, èªå¨åå¨ç¼è¾çæºæ件ã
Backup file æ¯å¦å¨æºæ件åçæ¶äº§çåå¤æ件(.BAKæ件)ã
Tab size 设置å¶è¡¨é®å¤§å°, é»è®¤ä¸º8ã
Zoomed windows å°ç°è¡æ´»å¨çªå£æ¾å¤§å°æ´ä¸ªå±å¹, å ¶çé®ä¸ºF5ã
Screen size 设置å±å¹ææ¬å¤§å°ã
.Directories(è·¯å¾)
è§å®ç¼è¯ãè¿æ¥æéæ件çè·¯å¾, æä¸åå项:
Include directories å å«æ件çè·¯å¾, å¤ä¸ªåç®å½ç¨";"åå¼ã
Library directories åºæ件路å¾, å¤ä¸ªåç®å½ç¨";"åå¼ã
Output directoried è¾åºæ件(.OBJ, .EXE, .MAPæ件)çç®å½ã
Turbo C directoried Turbo C æå¨çç®å½ã
Pick file name å®ä¹å è½½çpickæ件å, å¦ä¸å®ä¹åä»current
pick fileä¸åã
.Arguments(å½ä»¤è¡åæ°)
å 许ç¨æ·ä½¿ç¨å½ä»¤è¡åæ°ã
.Save options(åå¨é ç½®)
ä¿åææéæ©çç¼è¯ãè¿æ¥ãè°è¯å项ç®å°é ç½®æ件ä¸, 缺ççé ç½®æ件为
TCCONFIG.TCã
.Retrive options
è£ å ¥ä¸ä¸ªé ç½®æ件å°TCä¸, TCå°ä½¿ç¨è¯¥æ件çéæ©é¡¹ã
(7)ãDebug(è°è¯)èå
æAlt+Då¯éæ©Debugèå, 该èå主è¦ç¨äºæ¥é, å®å æ¬ä»¥ä¸å 容:
Evaluate
Expression è¦è®¡ç®ç»æç表达å¼ã
Result æ¾ç¤ºè¡¨è¾¾å¼ç计ç®ç»æã
New value èµç»æ°å¼ã
Call stack 该项ä¸å¯æ¥è§¦ãèå¨Turbo C debuger æ¶ç¨äºæ£
æ¥å æ æ åµã
Find function å¨è¿è¡Turbo C debuggeræ¶ç¨äºæ¾ç¤ºè§å®çå½æ°ã
Refresh display å¦æç¼è¾çªå£å¶ç¶è¢«ç¨æ·çªå£éåäºå¯ç¨æ¤æ¢å¤
ç¼è¾çªå£çå 容ã
(8)ãBreak/watch(æç¹åçè§è¡¨è¾¾å¼)
æAlt+Bå¯è¿å ¥Break/watchèå, 该èåæ以ä¸å 容:
Add watch åçè§çªå£æå ¥ä¸çè§è¡¨è¾¾å¼ã
Delete watch ä»çè§çªå£ä¸å é¤å½åççè§è¡¨è¾¾å¼ã
Edit watch å¨çè§çªå£ä¸ç¼è¾ä¸ä¸ªçè§è¡¨è¾¾å¼ã
Remove all watches ä»çè§çªå£ä¸å é¤ææççè§è¡¨è¾¾å¼ã
Toggle breakpoint 对å æ æå¨çè¡è®¾ç½®ææ¸ é¤æç¹ã
Clear all breakpoints æ¸ é¤æææç¹ã
View next breakpoint å°å æ 移å¨å°ä¸ä¸ä¸ªæç¹å¤ã
å Turbo C 2.0çé ç½®æ件
æè°é ç½®æ件æ¯å å«Turbo C 2.0æå ³ä¿¡æ¯çæ件, å ¶ä¸åæç¼è¯ãè¿æ¥çé
æ©åè·¯å¾çä¿¡æ¯ã
å¯ä»¥ç¨ä¸è¿°æ¹æ³å»ºç«Turbo C 2.0çé ç½®:
1. 建ç«ç¨æ·èªå½åçé ç½®æ件
å¯ä»¥ä»Optionsèåä¸éæ©Options/Save optionså½ä»¤, å°å½åéæå¼åç¯å¢
çææé ç½®åå ¥ä¸ä¸ªç±ç¨æ·å½åçé ç½®æ件ä¸ãä¸æ¬¡å¯å¨TCæ¶åªè¦å¨DOSä¸é®å ¥:
tc/c<ç¨æ·å½åçé ç½®æ件å>
å°±ä¼æè¿ä¸ªé ç½®æ件ä¸çå 容ä½ä¸ºTurbo C 2.0çéæ©ã
2. è¥è®¾ç½®Options/Environment/Config auto save 为on, åéåºéæå¼åç¯
å¢æ¶, å½åç设置ä¼èªå¨åæ¾å°Turbo C 2.0é ç½®æ件TCCONFIG.TCä¸ãTurbo C å¨
å¯å¨æ¶ä¼èªå¨å¯»æ¾è¿ä¸ªé ç½®æ件ã
3. ç¨TCINST设置Turbo Cçæå ³é ç½®, 并å°ç»æåå ¥TC.EXEä¸ãTurbo C å¨å¯
å¨æ¶, è¥æ²¡ææ¾å°é ç½®æ件, ååTC.EXEä¸ç缺çå¼ã
温馨提示:答案为网友推荐,仅供参考