home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / books / qcuprun.db < prev    next >
Encoding:
Text File  |  1991-03-01  |  131.1 KB  |  2,518 lines

  1. %@1@%%@AB@%Microsoft  QuickC  Compiler - UP AND RUNNING%@AE@%%@EH@%%@NL@%
  2.                                       %@NL@%
  3.                                       %@NL@%
  4.                                       %@NL@%
  5.                                       %@NL@%
  6.                                       %@NL@%
  7.                                       %@NL@%
  8.                                       %@NL@%
  9.  
  10. ────────────────────────────────────────────────────────────────────────────%@NL@%
  11.              %@AB@%Microsoft (R) QuickC (R) Compiler - UP AND RUNNING%@AE@%%@NL@%
  12.                                       %@NL@%
  13.                                 %@AB@%VERSION 2.5%@AE@%%@NL@%
  14. ────────────────────────────────────────────────────────────────────────────%@NL@%
  15.                                       %@NL@%
  16.                                       %@NL@%
  17.                            MICROSOFT CORPORATION %@NL@%
  18.                                       %@NL@%
  19.                                       %@NL@%
  20. %@NL@%
  21. %@NL@%
  22. %@NL@%%@NL@%
  23. %@NL@%
  24.  
  25.  
  26. Information in this document is subject to change without notice and does
  27. not represent a commitment on the part of Microsoft Corporation. The
  28. software described in this document is furnished under a license agreement
  29. or nondisclosure agreement. The software may be used or copied only in
  30. accordance with the terms of the agreement. It is against the law to copy
  31. the software on any medium except as specifically allowed in the license or
  32. nondisclosure agreement. No part of this manual may be reproduced or trans-
  33. mitted in any form or by any means, electronic or mechanical, including
  34. photocopying and recording, for any purpose without the express written
  35. permission of Microsoft.  
  36. (C) Copyright Microsoft Corporation, 1988, 1990. All rights reserved.%@NL@%
  37. %@NL@%
  38.  
  39. Printed and bound in the United States of America.%@NL@%
  40. %@NL@%
  41.  
  42. Microsoft, MS, MS-DOS, CodeView, and QuickC are registered 
  43. trademarks of Microsoft Corporation.%@NL@%
  44. %@NL@%
  45. Amdek is a registered trademark of Amdek Corporation.%@NL@%
  46. %@NL@%
  47. BRIEF is a registered trademark of UnderWare, Inc.%@NL@%
  48. %@NL@%
  49. COMPAQ is a registered trademark of Compaq Computer Corporation.%@NL@%
  50. %@NL@%
  51. Epsilon is a trademark of Lugaru Software, Inc.%@NL@%
  52. %@NL@%
  53. Hercules is a registered trademark of Hercules Computer 
  54. Technology.%@NL@%
  55. %@NL@%
  56. IBM is a registered trademark of International Business 
  57. Machines Corporation.%@NL@%
  58. %@NL@%
  59. Norton Guides is a trademark of Peter Norton Computing.%@NL@%
  60. %@NL@%
  61. WordStar is a registered trademark of MicroPro International 
  62. Corporation.%@NL@%
  63. %@NL@%
  64. Document No. SY10424-0290
  65. OEM D703-2Z
  66. 10 9 8 7 6 5 4 3 2 1 %@AI@%%@AE@%%@NL@%
  67. %@NL@%
  68. %@NL@%
  69. %@NL@%
  70. %@NL@%
  71. %@NL@%
  72. %@NL@%
  73. %@1@%%@AB@%Table of Contents%@AE@%%@EH@%%@NL@%
  74. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@NL@%
  75. %@NL@%
  76.  
  77. %@NL@%
  78. %@AB@%Introduction%@AE@%%@BO:        162e@%%@NL@%
  79.      Read This Manual First%@BO:        1a07@%%@NL@%
  80.      Features New to Version 2.5%@BO:        1fd1@%%@NL@%
  81. %@NL@%
  82. %@AB@%Chapter 1%@AE@%%@BO:        2290@%  %@AB@%Unpacking QuickC(R)%@AE@%%@NL@%
  83. %@NL@%
  84.      System Requirements%@BO:        2429@%%@NL@%
  85.      The QuickC Package%@BO:        275e@%%@NL@%
  86. %@NL@%
  87. %@AB@%Chapter 2%@AE@%%@BO:        2edc@%  %@AB@%Installing QuickC%@AE@%%@NL@%
  88. %@NL@%
  89.      A Quick Overview%@BO:        3293@%%@NL@%
  90.      Running SETUP%@BO:        39e7@%%@NL@%
  91.             SETUP Stage One%@BO:        48f4@%%@NL@%
  92.             SETUP Stage Two%@BO:        771f@%%@NL@%
  93.             SETUP Stage Three%@BO:        794e@%%@NL@%
  94. %@NL@%
  95. %@AB@%Chapter 3%@AE@%%@BO:        88fb@%  %@AB@%Using QuickC%@AE@%%@NL@%
  96. %@NL@%
  97.      The QuickC Environment%@BO:        8cf5@%%@NL@%
  98.      Using Windows and Menus%@BO:        9321@%%@NL@%
  99.             Getting Started%@BO:        9482@%%@NL@%
  100.             Using the Mouse and Keyboard%@BO:        9fb0@%%@NL@%
  101.             Windows%@BO:        a206@%%@NL@%
  102.             Menus%@BO:        ba8c@%%@NL@%
  103.             Dialog Boxes%@BO:        dc0c@%%@NL@%
  104.      Using the Editor%@BO:        e8d1@%%@NL@%
  105.             Moving Around in a Source File%@BO:        e9c1@%%@NL@%
  106.             Customizing the Editor%@BO:        f375@%%@NL@%
  107.             Using Another Editor%@BO:        fdf9@%%@NL@%
  108.      Compiling and Linking%@BO:       10559@%%@NL@%
  109.             Building within the QuickC Environment%@BO:       10879@%%@NL@%
  110.             Building from Multiple Source Files%@BO:       11ca2@%%@NL@%
  111.             Compiling and Linking from the Command Line%@BO:       135cb@%%@NL@%
  112.      The Debugger%@BO:       1418c@%%@NL@%
  113. %@NL@%
  114. %@AB@%Chapter 4%@AE@%%@BO:       14c92@%  %@AB@%Getting Help%@AE@%%@NL@%
  115. %@NL@%
  116.      Structure of the Microsoft Advisor%@BO:       14f2f@%%@NL@%
  117.      Navigating through the Microsoft Advisor%@BO:       15266@%%@NL@%
  118.             Using the Help Menu%@BO:       15507@%%@NL@%
  119.             Using the F1 Key%@BO:       15ccc@%%@NL@%
  120.             Using Hyperlinks%@BO:       16197@%%@NL@%
  121.             Using Help Windows and Dialog Boxes%@BO:       16896@%%@NL@%
  122.             Accessing Different Types of Information%@BO:       17ef8@%%@NL@%
  123. %@NL@%
  124. %@AB@%Chapter 5%@AE@%%@BO:       189c8@%  %@AB@%Where to Go from Here%@AE@%%@NL@%
  125. %@NL@%
  126. %@NL@%
  127. %@AB@%Appendix A%@AE@%%@BO:       19f81@%  %@AB@%Editor Functions%@AE@%%@NL@%
  128. %@NL@%
  129. %@NL@%
  130. %@AB@%Appendix B%@AE@%%@BO:       1dbc5@%  %@AB@%QuickC Differences%@AE@%%@NL@%
  131. %@NL@%
  132.      QuickC Version 2.0 Additions%@BO:       1dea4@%%@NL@%
  133.      QuickC Version 2.5 Additions and Changes%@BO:       1e19a@%%@NL@%
  134.             Interface and Environment Changes%@BO:       1e2a6@%%@NL@%
  135.             Language and Compiler Changes%@BO:       1e573@%%@NL@%
  136. %@NL@%
  137. %@NL@%
  138. %@CR:C6A-Intro   @%%@1@%%@AB@%Introduction%@AE@%%@EH@%%@NL@%
  139. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  140. %@NL@%
  141. Welcome to the Microsoft(R) QuickC(R) Compiler version 2.5, a powerful and
  142. sophisticated yet easy-to-use integrated environment for writing programs in
  143. the C language.  %@NL@%
  144. %@NL@%
  145. In recent years, the popularity of C has grown tremendously. C programs
  146. often can be ported from one computer to another. C programs are fast. C
  147. source code is compact and concise. The language encourages, but does not
  148. enforce, modular and structured programming styles. For these and other
  149. reasons, many programmers and professional software developers prefer C to
  150. any other language.  %@NL@%
  151. %@NL@%
  152. Microsoft QuickC combines the power of C with an environment that makes C
  153. easy to learn and to use. You can write code, compile and link it, run the
  154. program, and debug it, all without leaving the QuickC environment.  %@NL@%
  155. %@NL@%
  156. %@NL@%
  157. %@2@%%@CR:C6A00000001 @%%@AB@%Read This Manual First%@AE@%%@EH@%%@NL@%
  158. %@NL@%
  159. This manual contains all the information you need to install and begin using
  160. QuickC on your computer. There are five chapters:  %@NL@%
  161. %@NL@%
  162. %@AB@%Unpacking QuickC%@AE@% - Chapter 1 lists the system requirements (hardware that
  163. you provide) and the contents of this package (software and documentation
  164. that we provide).%@NL@%
  165. %@NL@%
  166. %@AB@%Installing QuickC%@AE@% - Before you can start using QuickC, you must install it.
  167. Although the installation process is quick and easy, you may want more
  168. information about libraries and memory models. Chapter 2 guides you through
  169. installation and provides answers to commonly asked questions.%@NL@%
  170. %@NL@%
  171. %@AB@%Using QuickC%@AE@% - Chapter 3 explains how to run QuickC and introduces the
  172. window and menu environment. Next, it presents an example of a typical
  173. development cycle: writing, compiling, linking, running, and debugging a
  174. short program.%@NL@%
  175. %@NL@%
  176. %@AB@%Getting Help%@AE@% - The Microsoft QuickC Advisor (online help) provides important
  177. reference information at the click of a button or press of a key. Chapter 4
  178. illustrates the many facets of QuickC's powerful online help system.%@NL@%
  179. %@NL@%
  180. %@AB@%Where to Go from Here%@AE@% - Once you have unpacked QuickC, installed it on your
  181. system, and compiled a sample program, you will probably want to investigate
  182. QuickC further. Chapter 5 provides some suggestions on what to do next. %@NL@%
  183. %@NL@%
  184. %@NL@%
  185. %@2@%%@CR:C6A00000002 @%%@AB@%Features New to Version 2.5%@AE@%%@EH@%%@NL@%
  186. %@NL@%
  187. If you have used an earlier version of QuickC, you'll find a variety of new
  188. features in version 2.5. These features include  %@NL@%
  189. %@NL@%
  190. %@NL@%
  191.   ■   Language compatibility with Microsoft C version 6.0%@NL@%
  192. %@NL@%
  193.   ■   Increased ANSI standard C compatibility%@NL@%
  194. %@NL@%
  195.   ■   Support for the tiny memory model (.COM files)%@NL@%
  196. %@NL@%
  197.   ■   Enhanced %@AI@%C for Yourself%@AE@%%@NL@%
  198. %@NL@%
  199.   ■   New Quickwatch debugging feature%@NL@%
  200. %@NL@%
  201.   ■   Customized color window support%@NL@%
  202. %@NL@%
  203. %@NL@%
  204. For a comprehensive list of new features, refer to Appendix B.  %@NL@%
  205. %@NL@%
  206. %@NL@%
  207. %@NL@%
  208. %@NL@%
  209. %@NL@%
  210. %@NL@%
  211. %@CR:C6A00010001 @%%@1@%%@AB@%Chapter 1  Unpacking QuickC(R)%@AE@%%@EH@%%@NL@%
  212. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  213. %@NL@%
  214. You're probably eager to install the QuickC Compiler immediately. But you
  215. should first take a few minutes to make sure your system meets minimum
  216. requirements and to determine that your package is complete.  %@NL@%
  217. %@NL@%
  218. %@NL@%
  219. %@2@%%@CR:C6A00010002 @%%@AB@%System Requirements%@AE@%%@EH@%%@NL@%
  220. %@NL@%
  221. QuickC requires the following minimum configuration:  %@NL@%
  222. %@NL@%
  223. %@NL@%
  224.   ■   An IBM(R) Personal Computer or compatible running DOS version 2.1 or
  225.       later.%@NL@%
  226. %@NL@%
  227.   ■   One hard-disk drive and one floppy-disk drive. %@NL@%
  228. %@NL@%
  229.   ■   448K (kilobytes) of available memory (512K is recommended for medium
  230.       to large projects).
  231. %@NL@%
  232. ────────────────────────────────────────────────────────────────────────────%@NL@%
  233. NOTE
  234.  
  235. %@AI@%Microsoft documentation uses the term "DOS" to refer to both the Microsoft
  236. %@AI@%and the IBM Disk Operating Systems (MS-DOS%@AI@%(R)%@AE@%%@AI@% and PC-DOS).%@AE@%%@AE@%%@NL@%
  237. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  238. %@NL@%
  239. %@NL@%
  240. %@NL@%
  241. %@NL@%
  242. %@NL@%
  243. %@2@%%@CR:C6A00010003 @%%@AB@%The QuickC Package%@AE@%%@EH@%%@NL@%
  244. %@NL@%
  245. Check your QuickC package to see if everything is there. If any pieces are
  246. missing, contact the retailer from whom you bought QuickC. In the package,
  247. you should find the following items:  %@NL@%
  248. %@NL@%
  249. %@AI@%Registration card:%@AE@% there are many advantages to being a registered owner of
  250. QuickC version 2.5, including notification of future software releases and
  251. easy access to customer assistance. Please take the time to fill out and
  252. mail the registration card now.  %@NL@%
  253. %@NL@%
  254. %@AI@%Disks:%@AE@% eight 5.25-inch floppy disks or four 3.5-inch floppy disks. The
  255. distribution disk labeled "Setup" contains a file named PACKING.LST that
  256. lists the location and description of all disk files in the Microsoft QuickC
  257. package.  %@NL@%
  258. %@NL@%
  259. %@AI@%Up and Running:%@AE@% the book you're reading now. It explains how to install and
  260. use QuickC.  %@NL@%
  261. %@NL@%
  262. %@AI@%C for Yourself:%@AE@% this book is written for programmers who know at least one
  263. language (such as BASIC or Pascal) but who don't know C. Part 1, "Learning
  264. C," is a tutorial that explains how to program in C. Many examples are
  265. included. Part 2, "Using C," examines further the library functions that
  266. perform input and output, the functions that create graphics, and new
  267. features such as real coordinate graphics, presentation graphics, fonts, and
  268. in-line assembly. The appendixes summarize the C language and QuickC library
  269. functions.  %@NL@%
  270. %@NL@%
  271. %@AI@%Microsoft QuickC Tool Kit:%@AE@% this book explains the individual tools and
  272. utilities that accompany QuickC. Beginners probably won't need to refer to
  273. this book while they're learning the fundamentals of C. Advanced C
  274. programmers should turn to this book for detailed information about
  275. compiling, linking, creating libraries, maintaining multiple-module
  276. programs, and more.  %@NL@%
  277. %@NL@%
  278. %@NL@%
  279. %@NL@%
  280. %@NL@%
  281. %@NL@%
  282. %@NL@%
  283. %@CR:C6A00020001 @%%@1@%%@AB@%Chapter 2  Installing QuickC%@AE@%%@EH@%%@NL@%
  284. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  285. %@NL@%
  286. This chapter tells you how to install the QuickC Compiler on your system.
  287. The SETUP.EXE program on the Setup distribution disk performs the
  288. installation.  %@NL@%
  289. %@NL@%
  290. SETUP.EXE does two things. First, it copies several programs (the compiler,
  291. the linker, the library manager, the help system, and others) from the
  292. distribution disks to your hard disk. Second, it creates one or more
  293. combined libraries. You can't program in C without a library.  %@NL@%
  294. %@NL@%
  295. This chapter also explains why it's necessary to build combined libraries
  296. and how the components fit together.  %@NL@%
  297. %@NL@%
  298. If you follow the instructions, when you finish the chapter you'll have a
  299. working version of QuickC on your system and you'll be ready to start
  300. programming in C.  %@NL@%
  301. %@NL@%
  302. %@NL@%
  303. %@2@%%@CR:C6A00020002 @%%@AB@%A Quick Overview%@AE@%%@EH@%%@NL@%
  304. %@NL@%
  305. There are four steps to installing QuickC:  %@NL@%
  306. %@NL@%
  307. %@NL@%
  308.   1.  Make backup copies of all distribution disks.%@NL@%
  309. %@NL@%
  310.   2.  Read the first section of the README.DOC file for information on
  311.       installing QuickC. If there are any corrections to this book, they're
  312.       listed at the beginning of README.DOC.%@NL@%
  313. %@NL@%
  314.   3.  Run SETUP.EXE, which is an interactive program. The questions you
  315.       answer determine the QuickC environment that is installed. Default
  316.       answers are listed in brackets. At the bottom of each screen is a
  317.       brief synopsis of what each question means.%@NL@%
  318. %@NL@%
  319.   4.  Adjust your system and environment variables. SETUP.EXE creates two
  320.       files: NEW-VARS.BAT and NEW-CONF.SYS. Add the information from the
  321.       NEW-VARS.BAT file to your AUTOEXEC.BAT file. If you'd prefer not to
  322.       make the changes permanent, you can run NEW-VARS.BAT as a batch file.
  323.       Change your CONFIG.SYS file if the %@AS@% files %@AE@% value and %@AS@% buffers %@AE@% value
  324.       are currently smaller than the values in NEW-CONF.SYS. After modifying
  325.       these files, reboot.%@NL@%
  326. %@NL@%
  327. %@NL@%
  328. The process is not difficult and each screen provides helpful guidance. If
  329. you have enough DOS and programming experience to complete these four steps
  330. without further assistance, we encourage you to do so. (If you get stuck,
  331. return to this chapter.) You may then skip ahead to Chapter 3, "Using
  332. QuickC."  %@NL@%
  333. %@NL@%
  334. ────────────────────────────────────────────────────────────────────────────%@NL@%
  335. NOTE
  336.  
  337. %@AI@%If you make a mistake during the setup process, just run the program again.
  338. %@AI@%SETUP.EXE never erases files from the distribution disks.%@AE@%%@NL@%
  339. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  340. %@NL@%
  341. %@NL@%
  342. %@2@%%@CR:C6A00020003 @%%@AB@%Running SETUP%@AE@%%@EH@%%@NL@%
  343. %@NL@%
  344. Before you run SETUP, back up the distribution disks using the DOS COPY
  345. command or the DISKCOPY program. Then read the first part of the README.DOC
  346. file by loading it into a word processor or by using the TYPE command:  %@NL@%
  347. %@NL@%
  348. %@AS@%  TYPE README.DOC | MORE%@AE@%%@NL@%
  349. %@NL@%
  350. When you are ready to install QuickC, insert the Setup disk in drive A and
  351. then change to that drive (type %@AS@% A:%@AE@% ). At the DOS command line, type  %@NL@%
  352. %@NL@%
  353. %@AS@%  SETUP%@AE@%%@NL@%
  354. %@NL@%
  355. ────────────────────────────────────────────────────────────────────────────%@NL@%
  356. NOTE
  357.  
  358. %@AI@%The following instructions assume that you plan to install QuickC on a
  359. %@AI@%system that has at least one floppy-disk drive and one hard-disk drive.%@AE@%%@NL@%
  360. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  361. %@NL@%
  362. %@NL@%
  363. %@4@%%@AB@%Correcting Mistakes%@AE@%%@EH@%%@NL@%
  364. %@NL@%
  365. Each setup screen ends by asking if you want to change any of the options.
  366. If you press Y, you can correct any of the answers you entered.  %@NL@%
  367. %@NL@%
  368. To exit the SETUP program at any time, press CTRL+C.  %@NL@%
  369. %@NL@%
  370. %@NL@%
  371. %@4@%%@AB@%Understanding Libraries%@AE@%%@EH@%%@NL@%
  372. %@NL@%
  373. Compared to other programming languages, C is very lean. It contains only a
  374. few dozen keywords and operators. To print something on the screen, for
  375. example, you call the %@AB@%printf%@AE@% function, which is %@AI@%not%@AE@% a keyword or an
  376. operator. It's not included in the C language proper. Strictly speaking,
  377. %@AB@%printf%@AE@% is a "library function."  %@NL@%
  378. %@NL@%
  379. When you link a program, the linker looks in the current library for any
  380. functions that were not defined in the program. If your source file calls
  381. %@AB@%printf%@AE@%, for example, the linker looks in the library for the machine code
  382. that executes the function, adds it to the executable program, and resolves
  383. any references to %@AB@%printf%@AE@%.  %@NL@%
  384. %@NL@%
  385. A library, then, is just a set of commonly used functions that have been
  386. gathered into one place. The American National Standards Institute (ANSI)
  387. defines a great number of library functions (including %@AB@%printf%@AE@%). Microsoft
  388. QuickC adds even more. In C, the keywords and operators number in the
  389. dozens, while the library functions number in the hundreds. Incidentally,
  390. you can add your own heavily used functions to the library (or combine them
  391. into a separate library) if you wish. See %@AI@%Microsoft QuickC Tool Kit%@AE@% for more
  392. information on using the Library Manager (LIB.EXE).  %@NL@%
  393. %@NL@%
  394. One of the key jobs performed by SETUP.EXE is building at least one large
  395. "combined library." Individual smaller parts of the library are called
  396. "component libraries." The two component libraries you must have are the
  397. memory model library and the math package library. The two additional
  398. component libraries containing graphics functions are optional.  %@NL@%
  399. %@NL@%
  400. You'll ultimately use one of the combined libraries when you compile and
  401. link a program.  %@NL@%
  402. %@NL@%
  403. %@NL@%
  404. %@4@%%@AB@%SETUP Options%@AE@%%@EH@%%@NL@%
  405. %@NL@%
  406. SETUP has two options for shortcuts: /H and /L. You should %@AI@%not%@AE@% use these
  407. options the first time you run SETUP.  %@NL@%
  408. %@NL@%
  409. Use the /L option after you have already installed QuickC and you want to
  410. build additional combined libraries without going through the entire setup
  411. process.  %@NL@%
  412. %@NL@%
  413. Combined libraries are described above (see "Understanding Libraries"). If
  414. you wish to add more libraries in the future, use the /L option:  %@NL@%
  415. %@NL@%
  416. %@AS@%  SETUP /L%@AE@%%@NL@%
  417. %@NL@%
  418. The /H option suppresses the SETUP help information sent to the screen. If
  419. you install QuickC again, you can bypass the help information by using the
  420. /H option:  %@NL@%
  421. %@NL@%
  422. %@AS@%  SETUP /H%@AE@%%@NL@%
  423. %@NL@%
  424. %@NL@%
  425. %@3@%%@CR:C6A00020004 @%%@AB@%SETUP Stage One%@AE@%%@EH@%%@NL@%
  426. %@NL@%
  427. Before SETUP can install QuickC, it needs some information about your system
  428. and the type of programming you intend to do. This first stage of SETUP is a
  429. series of questions split into three screens.  %@NL@%
  430. %@NL@%
  431. %@NL@%
  432. %@4@%%@AB@%First Screen: The Libraries%@AE@%%@EH@%%@NL@%
  433. %@NL@%
  434. The first screen asks these questions:  %@NL@%
  435. %@NL@%
  436. %@AS@%  Source of disk images [A:]:
  437. %@AS@%  Math Options: Emulator [Y]:8087 [N]:
  438. %@AS@%  Memory Models:Small[Y]:Medium[N]:Compact[N]:Large[N]:
  439. %@AS@%  Delete the component libraries when finished [Y]:
  440. %@AS@%  Include in combined libraries: GRAPHICS.LIB [N]:PGCHART.LIB [N]
  441. %@AS@%  
  442. %@AS@%  Do you want to change any of the above options [Y]:%@AE@%%@NL@%
  443. %@NL@%
  444. The questions appear on the screen one at a time. An explanation of each
  445. option appears at the bottom of the screen, unless you added the /H option
  446. when you ran SETUP. Answer the questions by typing in your responses and
  447. pressing ENTER.  %@NL@%
  448. %@NL@%
  449. Each question ends with a default answer inside square brackets (%@AS@%[Y]%@AE@%, for
  450. example). Press ENTER to accept the default. %@AI@%If you are unsure of the proper
  451. %@AI@%reply for any of these questions, consider the default a good place to
  452. %@AI@%start.%@AE@% If you later find you would have preferred to make another choice,
  453. you can always run SETUP again.  %@NL@%
  454. %@NL@%
  455. Each screen concludes by asking if you want to change any of your choices.
  456. When you're satisfied, press N (the default answer is Y, which returns you
  457. to the first question on the screen). If you start over, the default answers
  458. become the choices you made previously.  %@NL@%
  459. %@NL@%
  460. %@NL@%
  461. %@4@%%@AB@%Which Disk Drive?%@AE@%%@EH@%%@NL@%
  462. %@NL@%
  463. The first question on the first screen asks where you're starting from (the
  464. drive containing the distribution disks):  %@NL@%
  465. %@NL@%
  466. %@AS@%  Source of disk images [A:]:%@AE@%%@NL@%
  467. %@NL@%
  468. %@NL@%
  469. %@4@%%@AB@%Which Math Library?%@AE@%%@EH@%%@NL@%
  470. %@NL@%
  471. Your answer to the second question determines which math component libraries
  472. will be included in the combined library:  %@NL@%
  473. %@NL@%
  474. %@AS@%  Math Options: Emulator [Y]:    8087 [N]:%@AE@%%@NL@%
  475. %@NL@%
  476. Some computers contain an 8087 or 80287 math coprocessor chip and some
  477. don't.  %@NL@%
  478. %@NL@%
  479. If your machine is equipped with a coprocessor, linking your programs with
  480. the combined library tailored for the 8087 will speed up all floating-point
  481. calculations. However, these programs will run only on a machine that has an
  482. 8087 or 80287 chip.  %@NL@%
  483. %@NL@%
  484. Programs linked with the emulator library, on the other hand, will run on
  485. any computer, whether it has a coprocessor or not. The emulator library does
  486. check for the presence of a math coprocessor. If the computer has a
  487. coprocessor, it performs all floating-point math operations. If no
  488. coprocessor is installed, the emulator library "emulates" (imitates) the
  489. actions of a coprocessor.  %@NL@%
  490. %@NL@%
  491. If you're not sure which math library to include, choose the emulator
  492. library because it's the most flexible.  %@NL@%
  493. %@NL@%
  494. You may include both math libraries, but doing so doubles the number of
  495. combined libraries SETUP builds, thus doubling the time it takes to install
  496. QuickC. If you intend to install all possible library configurations, you'll
  497. need approximately 6 megabytes of available space on your hard disk. If you
  498. install just one library, you'll need about 2.7 megabytes of free space.  %@NL@%
  499. %@NL@%
  500. %@NL@%
  501. %@4@%%@AB@%Which Memory Model?%@AE@%%@EH@%%@NL@%
  502. %@NL@%
  503. The next question asks which memory models you plan to use:  %@NL@%
  504. %@NL@%
  505. %@AS@%  Memory Models: Small [Y]:   Medium [N]:   Compact [N]:   Large [N]:%@AE@%%@NL@%
  506. %@NL@%
  507. The small memory model is the default. If you're in a hurry to install
  508. QuickC, accept the default answer by pressing ENTER four times and bypass
  509. the explanation below. Should you discover that you need additional memory
  510. for your programs, you can run the SETUP program again. If you're curious
  511. about memory models, read on.  %@NL@%
  512. %@NL@%
  513. The 8086 processor and its relatives access memory in 64K blocks called
  514. "segments." To move outside of the current 64K segment requires additional
  515. machine instructions. Also, an address within the 64K segment can be
  516. specified with only two bytes. If you wish to access more than 64K of memory
  517. locations, their addresses must include additional bytes (which makes
  518. pointer variables longer and program execution slower).  %@NL@%
  519. %@NL@%
  520. C programs have two parts: the code (machine instructions) and the data
  521. (variables and constants). If you write programs that fit either the code or
  522. the data entirely within one 64K segment of memory, the program will execute
  523. faster and use less memory. However, if you need to use multiple memory
  524. segments for the code or the data, you may, although the program will run
  525. more slowly.  %@NL@%
  526. %@NL@%
  527. The various configurations of memory usage are called "memory models."
  528. QuickC supports six standard memory models. Table 2.1 illustrates the
  529. relationship between the six available memory models and the limits placed
  530. on their code and data segments.  %@NL@%
  531. %@NL@%
  532. %@AB@%Table 2.1  %@AB@%Memory Models%@AE@%%@AE@%
  533.  
  534. %@TH:   9   538 02 14 25 37 @%Memory Model  Code Segment Limit       Data Segment Limit%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%Tiny          64K total Code and Data  ─Small         64K                      64KMedium        None                     64KCompact       64K                      NoneLarge         None                     NoneHuge          None                     None%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@TE:   9   538 02 14 25 37 @%
  535.  
  536. For a great many applications, the small memory model suffices. The tiny
  537. memory model is similar to the small model except it is limited to 64K per
  538. program (including both code and data) and it produces .COM files instead of
  539. .EXE files. If you're working on a large database manager, you might want
  540. one of the models that provides unlimited data segments (compact, large, or
  541. huge). If you're writing a program with many functions, you might want to
  542. remove the limit on the code segment (medium, large, or huge).  %@NL@%
  543. %@NL@%
  544. The huge memory model uses the same library as the large model, so the SETUP
  545. program offers only four choices. The difference between large and huge is
  546. that  %@NL@%
  547. %@NL@%
  548. the huge model allows individual arrays to exceed 64K, whereas the large
  549. model limits arrays to 64K.  %@NL@%
  550. %@NL@%
  551. Any or all of these memory models may be selected, but SETUP.EXE will build
  552. a separate combined library for each model. For example, if you choose the
  553. small memory model and the math emulator, the library file SLIBCE.LIB is
  554. created. If you choose the medium model and the 8087 math package,
  555. MLIBC7.LIB is created. The small memory model libraries start with the
  556. letter "S," medium with "M," compact with "C," and large with "L."
  557. Similarly, the emulator math package is shown by a final "E" in the file
  558. name, the 8087 package by a "7."  %@NL@%
  559. %@NL@%
  560. Given four memory models and two math packages, you can create a total of
  561. eight combined libraries. But the more combined libraries you create, the
  562. more space they'll take on your hard disk and the longer the installation
  563. process will take.  %@NL@%
  564. %@NL@%
  565. The first time you install QuickC, create only one or two combined
  566. libraries. If you find a need for other memory models or math packages, just
  567. run the SETUP program again.  %@NL@%
  568. %@NL@%
  569. %@NL@%
  570. %@4@%%@AB@%Include Graphics Libraries?%@AE@%%@EH@%%@NL@%
  571. %@NL@%
  572. The graphics library GRAPHICS.LIB contains numerous functions for drawing
  573. lines, rectangles, circles, and other shapes. If you plan to write programs
  574. that use these functions, press Y to answer the first of these two
  575. questions:  %@NL@%
  576. %@NL@%
  577. %@AS@%  Include in combined libraries:GRAPHICS.LIB[N]: PGCHART.LIB[N]: %@AE@%%@NL@%
  578. %@NL@%
  579. However, if you plan to write programs that use text output only, then you
  580. probably don't need GRAPHICS.LIB taking up room on your disk. Press N to
  581. omit the graphics library. (If you very rarely need graphics functions, you
  582. can omit the graphics library and, whenever you need the functions,
  583. explicitly link the graphics library GRAPHICS.LIB. See the %@AI@%Microsoft QuickC
  584. %@AI@%Tool Kit%@AE@% manual for more information about linking with a specific library.)
  585. %@NL@%
  586. %@NL@%
  587. The PGCHART.LIB library contains presentation graphics functions for
  588. creating high-resolution graphs (line graphs, bar charts, column charts,
  589. scatter diagrams, and pie charts). Again, if you want to display such
  590. graphics in your programs, press Y to include this component library. If
  591. you'll use presentation graphics rarely or not at all, press N to omit this
  592. library.  %@NL@%
  593. %@NL@%
  594. %@NL@%
  595. %@4@%%@AB@%Second Screen: Extra Files%@AE@%%@EH@%%@NL@%
  596. %@NL@%
  597. The next screen asks the following questions about copying additional files
  598. to your hard disk:  %@NL@%
  599. %@NL@%
  600. %@AS@%  Install Microsoft Mouse [Y]:
  601. %@AS@%  Copy documentation files [Y]:
  602. %@AS@%  Copy the DOS patch files [N]:
  603. %@AS@%  Copy sample C programs [N]:
  604. %@AS@%  Copy the QuickC tutorial files [N]:
  605. %@AS@%  
  606. %@AS@%  Do you want to change any of the above options [Y]:%@AE@%%@NL@%
  607. %@NL@%
  608. SETUP will copy these extra files to your hard disk if you want them.  %@NL@%
  609. %@NL@%
  610. As before, each of these questions is accompanied by an explanation at the
  611. bottom of your screen to help you decide if these files would be useful.  %@NL@%
  612. %@NL@%
  613. %@NL@%
  614. %@4@%%@AB@%Third Screen: The Directories%@AE@%%@EH@%%@NL@%
  615. %@NL@%
  616. The final set of questions asks for the names of directories in which to
  617. store the various files.  %@NL@%
  618. %@NL@%
  619. %@AS@%  Directory for Executable files [C:\QC25\BIN]:
  620. %@AS@%  Directory for Libraries [C:\QC25\LIB]:
  621. %@AS@%  Directory for Include files [C:\QC25\INCLUDE]:
  622. %@AS@%  Directory for Sample files [C:\QC25\SAMPLES]:
  623. %@AS@%  Directory for Tutorial files [C:\QC25\TUTORIAL]:
  624. %@AS@%  
  625. %@AS@%  Do you want to change any of the above options [Y]:%@AE@%%@NL@%
  626. %@NL@%
  627. You don't have to choose any of the default options. You might decide you
  628. want your executable programs in C:\QC25\BIN and your source files in
  629. C:\C_CODE, for example. Type in the names of directories you want SETUP to
  630. use (including the drive name in the path). If the directories don't exist,
  631. SETUP asks if you want to create them.  %@NL@%
  632. %@NL@%
  633. QuickC can be used in conjunction with the Microsoft C Professional
  634. Development System version 6.0. To use QuickC with Microsoft C, choose the
  635. directories where Microsoft C stores executable files, libraries, and header
  636. files: their default names are C:\C600\BIN, C:\C600\LIB, and
  637. C:\C600\INCLUDE; corresponding QuickC directories are C:\QC25\BIN,
  638. C:\QC25\LIB, and C:\QC25\INCLUDE.  %@NL@%
  639. %@NL@%
  640. %@NL@%
  641. %@4@%%@AB@%Checking the Available Disk Space%@AE@%%@EH@%%@NL@%
  642. %@NL@%
  643. Before moving on to stage two, the SETUP program checks your hard disk to
  644. see how much free space is available. If you don't have enough room to
  645. install QuickC (the amount needed varies according to the options you've
  646. chosen), an error message tells you how much space is required for the files
  647. you've requested. If you attempt to install all possible libraries, you'll
  648. need approximately 6 megabytes. If you install just one combined library,
  649. you'll need roughly 2.7 megabytes.  %@NL@%
  650. %@NL@%
  651. If you don't have enough room on your hard disk, you have two choices.
  652. First, you can delete files from the hard disk until there's enough room for
  653. the libraries you want to create. Second, you can reduce the number of
  654. libraries you request (or you can choose not to copy the samples and
  655. documentation files) to cut down the amount of space you need. Either way,
  656. you'll have to run SETUP again.  %@NL@%
  657. %@NL@%
  658. %@NL@%
  659. %@3@%%@CR:C6A00020005 @%%@AB@%SETUP Stage Two%@AE@%%@EH@%%@NL@%
  660. %@NL@%
  661. Now that you've specified your system and programming needs, SETUP goes to
  662. work. This stage requires you to swap the distribution disks in and out of
  663. the drive. Insert the disks as SETUP asks for them and press ENTER. If you
  664. put in the wrong disk, SETUP will ask again for the proper disk.  %@NL@%
  665. %@NL@%
  666. At this point, all SETUP needs is the go-ahead from you. It starts building
  667. the combined libraries you requested, placing them in the directories you
  668. specified.  %@NL@%
  669. %@NL@%
  670. %@NL@%
  671. %@3@%%@CR:C6A00020006 @%%@AB@%SETUP Stage Three%@AE@%%@EH@%%@NL@%
  672. %@NL@%
  673. When SETUP finishes creating the combined libraries, it creates two files:
  674. NEW-VARS.BAT and NEW-CONF.SYS. To install these files permanently, you must
  675. now adjust the DOS environment and modify both your AUTOEXEC.BAT and
  676. CONFIG.SYS files.  %@NL@%
  677. %@NL@%
  678. ────────────────────────────────────────────────────────────────────────────%@NL@%
  679. NOTE
  680.  
  681. %@AI@%If you use other languages that have their own LINK.EXE program, you may not
  682. %@AI@%want to put the QuickC linker in your path. If this is the case, you can
  683. %@AI@%modify CONFIG.SYS and run NEW-VARS.BAT each time you use QuickC.%@AE@%%@NL@%
  684. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  685. %@NL@%
  686. %@NL@%
  687. %@4@%%@AB@%Changing AUTOEXEC.BAT%@AE@%%@EH@%%@NL@%
  688. %@NL@%
  689. The file NEW-VARS.BAT created by SETUP might look something like this:  %@NL@%
  690. %@NL@%
  691. %@AS@%  PATH=C:\QC25\BIN;C:\DOS;C:\MYEXE;C:\WIN386;C:\WORD
  692. %@AS@%  set LIB=C:\QC25\LIB
  693. %@AS@%  set INCLUDE=C:\QC25\INCLUDE%@AE@%%@NL@%
  694. %@NL@%
  695. PATH is a system variable that tells your computer where to find executable
  696. programs. The LIB and INCLUDE variables tell QuickC where to find the
  697. libraries and the include files.  %@NL@%
  698. %@NL@%
  699. To make the change permanent, load your current AUTOEXEC.BAT file into an
  700. editor or word processor (you'll find AUTOEXEC.BAT in the root directory),
  701. add the new path names, and save the modified file.  %@NL@%
  702. %@NL@%
  703. You can edit the AUTOEXEC.BAT file with the QuickC editor if you wish.
  704. Change to the directory containing the QC.EXE program (for example, type %@AS@% CD
  705. %@AS@%\QC25\BIN%@AE@% ) and type %@AS@% QC \AUTOEXEC.BAT %@AE@%(the backslash indicates that the
  706. file is in the root directory). Then use the File menu Merge command to
  707. merge NEW-VARS.BAT into AUTOEXEC.BAT.  %@NL@%
  708. %@NL@%
  709. In most cases, it is best to change the AUTOEXEC.BAT file and reboot.
  710. How-ever, if you use other languages and other compilers, you may wish to
  711. leave the AUTOEXEC.BAT file alone and run the NEW-VARS.BAT file before each
  712. QuickC session.  %@NL@%
  713. %@NL@%
  714. If you want to use the 8087 math library instead of the emulator library,
  715. use the /FPi87 option as a custom flag within the QuickC Linker Flags dialog
  716. box or at the command line using QCL. If you compile and link from the
  717. QuickC environment, either add the line below to your AUTOEXEC.BAT file or
  718. type it at the command line:  %@NL@%
  719. %@NL@%
  720. %@AS@%  SET CL=/FPi87%@AE@%%@NL@%
  721. %@NL@%
  722. To maintain compatibility between the QuickC and Microsoft C compilers, the
  723. CL environment variable is used. If you include options that the Microsoft C
  724. compiler recognizes but QuickC doesn't, QuickC issues an error message.  %@NL@%
  725. %@NL@%
  726. %@NL@%
  727. %@4@%%@AB@%Modifying CONFIG.SYS%@AE@%%@EH@%%@NL@%
  728. %@NL@%
  729. The NEW-CONF.SYS file might look like this:  %@NL@%
  730. %@NL@%
  731. %@AS@%  files=20
  732. %@AS@%  buffers=10%@AE@%%@NL@%
  733. %@NL@%
  734. You need to be sure that the %@AS@% files %@AE@% and %@AS@% buffer %@AE@% values are large enough to
  735. contain QuickC. Load your CONFIG.SYS file into an editor or word processor
  736. (again, it should be in the root directory), change the two lines that refer
  737. to files and buffers, and save the modified file. If your current CONFIG.SYS
  738. file has higher numbers ( %@AS@%files = 30%@AE@%, for example), you can leave the higher
  739. value in effect. The numbers in NEW-CONF.SYS are minimums; you may safely
  740. use higher values.  %@NL@%
  741. %@NL@%
  742. ────────────────────────────────────────────────────────────────────────────%@NL@%
  743. NOTE
  744.  
  745. %@AI@%Merely changing the AUTOEXEC.BAT and CONFIG.SYS files does not affect the
  746. %@AI@%current DOS environment. To put the changes into effect, you must reboot
  747. %@AI@%your machine by powering off and then on or by pressing CTRL+ALT+DEL%@AI@%.%@AE@%%@AE@%%@NL@%
  748. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  749. %@NL@%
  750. After installing QuickC, changing the files, and rebooting, you can proceed
  751. to Chapter 3, "Using QuickC."  %@NL@%
  752. %@NL@%
  753. %@NL@%
  754. %@NL@%
  755. %@NL@%
  756. %@NL@%
  757. %@NL@%
  758. %@CR:C6A00030001 @%%@1@%%@AB@%Chapter 3  Using QuickC%@AE@%%@EH@%%@NL@%
  759. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  760. %@NL@%
  761. If you followed the instructions in Chapter 2, "Installing QuickC," you now
  762. have a working version of the QuickC Compiler and are ready to write your
  763. first program. This chapter introduces the QuickC environment─a powerful
  764. tool to help you write and test programs.  %@NL@%
  765. %@NL@%
  766. In this chapter you'll work through a sample compiling and linking session.
  767. When you finish, you will have written, saved, built, and tested a working
  768. program.  %@NL@%
  769. %@NL@%
  770. If you'd prefer to experiment on your own or if you've previously used an
  771. older version of QuickC, you can skip this chapter (or skim through it). We
  772. strongly suggest, however, that if you do nothing else, review the next
  773. chapter, "Getting Help." In addition, we recommend that all QuickC users run
  774. the LEARN program, which teaches how to use the QuickC environment.  %@NL@%
  775. %@NL@%
  776. %@NL@%
  777. %@2@%%@CR:C6A00030002 @%%@AB@%The QuickC Environment%@AE@%%@EH@%%@NL@%
  778. %@NL@%
  779. QuickC is a window-based programming environment that integrates a text
  780. editor, a compiler, a linker, a debugger utility, a make utility, and an
  781. on-line help database. This chapter introduces and describes the following
  782. aspects of QuickC:  %@NL@%
  783. %@NL@%
  784. %@AB@%Windows and Menus%@AE@% - The menu system allows you to quickly find the command
  785. or action you need. The first part of this chapter explains how to open and
  786. close windows and how to navigate the menus. It also defines certain terms
  787. used throughout the chapter.%@NL@%
  788. %@NL@%
  789. %@AB@%Editor%@AE@% - When you're writing source code, you'll spend a lot of time using
  790. the QuickC editor. If you know WordStar(R) commands, you'll know how to use
  791. the QuickC editor. If you'd prefer to customize the editor, you can use the
  792. MKKEY utility, which is explained in the "Customizing the Editor" section.%@NL@%
  793. %@NL@%
  794. %@AB@%Compiler/Linker%@AE@% - You can compile, link, and test a program without ever
  795. leaving the editor. QuickC's integrated environment saves you hours of
  796. development time. This part of the chapter defines and illustrates the
  797. various compiling and linking options.%@NL@%
  798. %@NL@%
  799. %@AB@%Debugger%@AE@% - The debugger allows you to set breakpoints, to monitor the status
  800. of key variables, and to trace program execution line by line. This section
  801. of the chapter provides a brief overview of the debugger utility. The LEARN
  802. program includes a lesson that provides more details about the new, advanced
  803. debugging enhancements.%@NL@%
  804. %@NL@%
  805. %@NL@%
  806. %@2@%%@CR:C6A00030003 @%%@AB@%Using Windows and Menus%@AE@%%@EH@%%@NL@%
  807. %@NL@%
  808. Even if you've never used windows and menus before, you'll find the QuickC
  809. programming environment easy to learn.  %@NL@%
  810. %@NL@%
  811. This section introduces the QuickC environment. You'll learn how to control
  812. windows and to choose commands from the menus.  %@NL@%
  813. %@NL@%
  814. %@NL@%
  815. %@3@%%@CR:C6A00030004 @%%@AB@%Getting Started%@AE@%%@EH@%%@NL@%
  816. %@NL@%
  817. To run QuickC, type  %@NL@%
  818. %@NL@%
  819. %@AS@%  QC%@AE@%%@NL@%
  820. %@NL@%
  821. at the DOS prompt. You'll immediately enter the QuickC editor.  %@NL@%
  822. %@NL@%
  823. If you enter a file name after the %@AS@% QC %@AE@% command, for example,  %@NL@%
  824. %@NL@%
  825. %@AS@%  QC MYFILE%@AE@%%@NL@%
  826. %@NL@%
  827. QuickC automatically adds the extension .C that marks a C source file.
  828. Typing the line above causes QuickC to load MYFILE.C.  %@NL@%
  829. %@NL@%
  830. If QuickC can't find the file you specified in the current directory, it
  831. asks if you want to create a new file.  %@NL@%
  832. %@NL@%
  833. If you do not enter a file name after the %@AS@% QC %@AE@% command, QuickC opens an
  834. empty file named UNTITLED.C, which you can rename later or save with another
  835. name.  %@NL@%
  836. %@NL@%
  837. %@NL@%
  838. %@4@%%@AB@%Command-Line Options%@AE@%%@EH@%%@NL@%
  839. %@NL@%
  840. Depending on your particular hardware, you may be required to include one of
  841. the following options on the command line after the %@AS@% QC %@AE@% command but before
  842. the file name, for example, %@AS@% QC /b MYPROG%@AE@%.  %@NL@%
  843. %@NL@%
  844. %@AB@%Option%@AE@%                            %@AB@%Hardware%@AE@%
  845. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  846. %@AS@%/b%@AE@%                                For black-and-white systems, including 
  847.                                   Hercules(R) monochrome monitors, LCD 
  848.                                   screens, and black-and- white monitors.
  849.  
  850. %@AS@%/g%@AE@%                                For AT-compatible systems that refresh 
  851.                                   the screen at a slower rate than the 
  852.                                   standard AT (including some COMPAQ(R) 
  853.                                   systems).
  854.  
  855. %@AS@%/h%@AE@%                                For systems equipped with EGA-, VGA-, or
  856.                                   MCGA-compatible graphics cards capable 
  857.                                   of displaying more than 25 lines of text.
  858.                                   EGA cards can display 43 lines of text, 
  859.                                   VGA cards can display 50. You can use a
  860.                                   Microsoft (or fully compatible) mouse 
  861.                                   with this option. If you encounter 
  862.                                   problems, contact the manufacturer of 
  863.                                   the mouse.
  864.  
  865. %@AS@%/k%@AE@%                                Loads a key file with customized QuickC 
  866.                                   editor
  867.                                   commands.
  868.  
  869. %@AS@%/nohi%@AE@%                             For systems that don't support 
  870.                                   high-intensity colors (including LCD 
  871.                                   monochrome monitors and some Amdek(R) 
  872.                                   color monitors).
  873.  
  874. %@NL@%
  875. %@3@%%@CR:C6A00030005 @%%@AB@%Using the Mouse and Keyboard%@AE@%%@EH@%%@NL@%
  876. %@NL@%
  877. You can enter all commands from the keyboard. If you own a Microsoft (or
  878. fully compatible) Mouse, you can choose to use either the keyboard or the
  879. mouse to enter commands. When this book explains a command, the two options
  880. are marked with icons of a key or a mouse as follows:  %@NL@%
  881. %@NL@%
  882. Press the ALT key.  %@NL@%
  883. %@NL@%
  884. Click the File menu, then click Save.  %@NL@%
  885. %@NL@%
  886. Unless the right button is specifically mentioned, "clicking" means that you
  887. click the mouse's left button once.  %@NL@%
  888. %@NL@%
  889. %@NL@%
  890. %@3@%%@CR:C6A00030006 @%%@AB@%Windows%@AE@%%@EH@%%@NL@%
  891. %@NL@%
  892. The system of windows and menus is simple to use and intuitive. Many
  893. programmers can learn how to use the QuickC environment without learning the
  894. terms that describe the various menus and buttons. In addition, if you're
  895. confused about windows or menus, you can almost always call up a help window
  896. that explains how a menu works (see Chapter 4, "Getting Help"). However, if
  897. you want to read further in this chapter, you'll have to understand the
  898. terms that are used.  %@NL@%
  899. %@NL@%
  900. Figure 3.1 shows a typical QuickC screen, with labels that describe its
  901. parts. Some of the parts provide information only. For example, if the CAPS
  902. LOCK key is on, a letter %@AS@% C %@AE@% appears in the bottom right corner. The letter %@AS@%
  903. %@AS@%C %@AE@% is informational (it tells you the CAPS LOCK key is on). Other parts of a
  904. window perform actions triggered by a specific key or mouse action. For
  905. example, if you click the little box in the upper-left corner of a window,
  906. the window closes. The box is not informational; it's active.  %@NL@%
  907. %@NL@%
  908. %@AU@%(This figure may be found in the printed book.)%@AE@%%@NL@%
  909. %@NL@%
  910. The parts of a window, their status, and their use are listed in Table 3.1.
  911. %@NL@%
  912. %@NL@%
  913. %@AB@%Table 3.1  %@AB@%Parts of a Window%@AE@%%@AE@%
  914.  
  915. %@TH:  25  1346 02 17 22 37 @%Name             Status                Use%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%Close button     Active                Closes the current window (the                                        source window cannot be closed).                                        Appears in upper-left corner.Menu bar         Active                Lists names of the available menus.Title bar        Informational         Shows name of the window (the                                        source window title bar lists the                                        file currently being edited).Source window    Active                Contains source code for the                                        program you're writing. Seven other                                       windows are supported: Debug, Help,                                       Locals, Registers, Notepad, Output,                                       and Errors.Maximize button  Active                Shrinks or enlarges the current                                        window.Reference bar    Informational/        Lists shortcut keystrokes (keyboard                 Active                users) and direct commands to                                        QuickC (mouse users).%@TE:  25  1346 02 17 22 37 @%
  916.  
  917. %@AB@%Table   %@AB@%3.1 (continued)%@AE@%%@AE@%
  918.  
  919. %@TH:  25  1519 02 24 15 37 @%Name                    Status         Use%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%Scroll bars             Active         Indicate your position in the                                        current file. If you click in the                                        gray area on either side of the                                        position marker, you move in that                                        direction. If you click the arrows,                                       you move one line (or one character)                                       in that direction. If you click and                                       drag the position indicator, you                                        can move anywhere within the file.Line/Column             Informational  Show the current line and column ofindicators                             the text cursor.                                        C means CAPS LOCK is on.                                        N means NUM LOCK is on.File status indicators  Informational  R means the file is set to Read                                        Only status.                                        D means Debugging History is on.                                        I means the debugging history                                        includes user input.%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@TE:  25  1519 02 24 15 37 @%
  920.  
  921. %@NL@%
  922. %@4@%%@AB@%Using the Menu Bar%@AE@%%@EH@%%@NL@%
  923. %@NL@%
  924. To choose a command from a menu, you "pull down" or "open" the menu and
  925. choose the command you want:  %@NL@%
  926. %@NL@%
  927. %@NL@%
  928.   1.  Press the ALT key to activate the menu bar.%@NL@%
  929. %@NL@%
  930.   2.  Press the highlighted character in the menu name (F = File, for
  931.       example).%@NL@%
  932. %@NL@%
  933.   3.  Press the highlighted character in the item name (in the File menu, S
  934.       = Save, for example).%@NL@%
  935. %@NL@%
  936. %@NL@%
  937. Or follow these steps:  %@NL@%
  938. %@NL@%
  939. %@NL@%
  940.   1.  Press the ALT key.%@NL@%
  941. %@NL@%
  942.   2.  Use the RIGHT and LEFT arrow keys to move to the menu you want.%@NL@%
  943. %@NL@%
  944.   3.  Use the UP and DOWN arrow keys to highlight the command.%@NL@%
  945. %@NL@%
  946.   4.  Press ENTER.%@NL@%
  947. %@NL@%
  948. %@NL@%
  949. Or:  %@NL@%
  950. %@NL@%
  951. %@NL@%
  952.   1.  Open the menu by clicking the menu name.%@NL@%
  953. %@NL@%
  954.   2.  Click the command.%@NL@%
  955. %@NL@%
  956. %@NL@%
  957. %@NL@%
  958. %@4@%%@AB@%Making the Menu Disappear%@AE@%%@EH@%%@NL@%
  959. %@NL@%
  960. If at any point you decide that you don't want to choose a command from a
  961. menu, you can make the menu disappear:  %@NL@%
  962. %@NL@%
  963. Press the ESC key.  %@NL@%
  964. %@NL@%
  965. Click somewhere on the screen outside of the menu.  %@NL@%
  966. %@NL@%
  967. %@NL@%
  968. %@4@%%@AB@%Shortcut Keys%@AE@%%@EH@%%@NL@%
  969. %@NL@%
  970. In the menus below, you'll notice that certain menu items are followed by
  971. names of keys. These are the "shortcut keys" for heavily used commands. For
  972. example, the Run menu Restart command is followed by SHIFT+F5, which means
  973. that instead of opening the Run menu and choosing the Restart command, you
  974. can instead hold down the SHIFT key and press F5.  %@NL@%
  975. %@NL@%
  976. ────────────────────────────────────────────────────────────────────────────%@NL@%
  977. NOTE
  978.  
  979. %@AI@%The reference bar displays commonly used shortcut keys. In addition, the
  980. %@AI@%inside front cover of this book lists the important shortcut keys for easy
  981. %@AI@%reference.%@AE@%%@NL@%
  982. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  983. %@NL@%
  984. %@NL@%
  985. %@3@%%@CR:C6A00030007 @%%@AB@%Menus%@AE@%%@EH@%%@NL@%
  986. %@NL@%
  987. The menu bar contains ten menus, which you can pull down at any time. If you
  988. don't know what a menu does, invoke the online help system by highlighting
  989. the menu title (or highlighting a command within a menu) and pressing F1 or
  990. clicking the right mouse button. QuickC uses the following menus:  %@NL@%
  991. %@NL@%
  992. %@TH:  85  5504 01 37 39 @%%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@AU@%(Please refer to the printed book.)%@AE@%  The File menu controls files,                                      allowing you to clear the source                                      window (New), load an existing source                                     file (Open), append a file to the                                      source code in memory (Merge), save                                      the current file (Save), rename the                                      current file (Save As), print the                                      source code (Print), temporarily quit                                     to DOS (DOS Shell) and return to                                      QuickC by typing EXIT at the command                                      line, or permanently exit QuickC                                      (Exit).%@AU@%(Please refer to the printed book.)%@AE@%  From the Edit menu you manipulate                                      text by deleting, cutting, copying,                                      and pasting lines of code. You can                                      also set Read Only status to protect                                      source files.%@AU@%(Please refer to the printed book.)%@AE@%  The View menu controls the visible                                      screen. You can rapidly switch                                      between multiple modules (Source),                                      read through include files (Include)                                      make visible the output screen                                      (Output Screen), expand the source                                      window (Maximize), or open and close                                      the various windows (Windows).%@AU@%(Please refer to the printed book.)%@AE@%  The Search menu invokes the commands                                      that find or replace text or                                      functions in source files. It also                                      moves to a specified line and                                      searches for the next source line                                      that caused a compiler error.%@AU@%(Please refer to the printed book.)%@AE@%  The Make menu allows you to compile                                      (Compile) or to compile and link                                      (Build) programs. From this menu, you                                     also create or edit program lists                                      that name the components of a                                      multimodule program.%@AU@%(Please refer to the printed book.)%@AE@%  Once a program is compiled and                                      residing in memory, use the Run menu                                      to run it. You can run it from                                      beginning to end, selectively run                                      individual sections, or trace through                                     the program line by line.%@AU@%(Please refer to the printed book.)%@AE@%  If your program contains logic errors,                                     the Debug menu allows you to set                                      breakpoints, watchpoints, and watch                                      values. In addition, you can keep                                      track of variables and their changing                                     values. (This feature means there's                                      no need to sprinkle %@AB@%printf%@AE@% functions                                      throughout your program just to watch                                     variables as they change values.)%@AU@%(Please refer to the printed book.)%@AE@%  The Utility menu allows you to run                                      DOS commands and programs from within                                     the QuickC environment. You can run                                      the online QuickC tutorial ("Learn                                      QuickC"), or if you find that you use                                     certain programs often, you may want                                      to add them to the Utility menu                                      (Customize Menu). For example, you                                      can add your favorite program editor                                      to this menu if you wish.%@AU@%(Please refer to the printed book.)%@AE@%  The items on the Options menu control                                     the integrated environment. For                                      example, the Options menu Color                                      command allows you to change the                                      colors used on the screen. The                                      Options menu Make command controls                                      flags that affect the actions of the                                      compiler and linker.%@AU@%(Please refer to the printed book.)%@AE@%  The Help menu is one route to the                                      online help system. For more about                                      this topic, see Chapter 4, "Getting                                      Help."%@TE:  85  5504 01 37 39 @%
  993.  
  994. %@NL@%
  995. %@4@%%@AB@%Short Menus and Full Menus%@AE@%%@EH@%%@NL@%
  996. %@NL@%
  997. If you open the Options menu, you'll see one of the two menus below:  %@NL@%
  998. %@NL@%
  999. %@TH:   2   220 01 37 39 @%%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@AU@%(Please refer to the printed book.)%@AE@%  %@AU@%(Please refer to the printed book.)%@AE@%%@TE:   2   220 01 37 39 @%
  1000.  
  1001. When six commands are listed under Options and a dot appears beside Full
  1002. Menus, it means full menus are turned on. When the Options menu holds only
  1003. two commands and Full Menus has no dot, short menus are in effect.  %@NL@%
  1004. %@NL@%
  1005. To change from full menus to short menus or vice versa, choose the Full
  1006. Menus command. The command is a toggle button; that is, it changes from on
  1007. to off, or off to on, when pressed.  %@NL@%
  1008. %@NL@%
  1009. The short menus contain all the commands you need to write, compile, and run
  1010. a C program. The short menus may seem easier to use, especially for
  1011. beginners. If you prefer to see every possible option, you should enable
  1012. Full Menus. The choice is yours.  %@NL@%
  1013. %@NL@%
  1014. ────────────────────────────────────────────────────────────────────────────%@NL@%
  1015. NOTE
  1016.  
  1017. %@AI@%When you set preferences from the Options menu─full menus, memory models,
  1018. %@AI@%compile options, and so on─your choices are saved in the current directory
  1019. %@AI@%in a file called QC.INI. If you set an option, it stays set from one QuickC
  1020. %@AI@%session to the next, or until you change it.%@AE@%%@NL@%
  1021. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  1022. %@NL@%
  1023. %@NL@%
  1024. %@4@%%@AB@%Shaded Commands%@AE@%%@EH@%%@NL@%
  1025. %@NL@%
  1026. When a command within a menu is shaded, it is unavailable. You can't use it.
  1027. %@NL@%
  1028. %@NL@%
  1029. For example, when you first run QuickC and haven't yet compiled or linked a
  1030. program, you can open the Search menu and see that both Next Error and
  1031. Previous Error are shaded. You haven't done anything to generate errors, so
  1032. there are no errors to view.  %@NL@%
  1033. %@NL@%
  1034. %@NL@%
  1035. %@4@%%@AB@%Ellipses%@AE@%%@EH@%%@NL@%
  1036. %@NL@%
  1037. When a command is followed by three periods (an ellipsis), it means QuickC
  1038. needs more information before it executes the command. If a command is not
  1039. followed by an ellipsis, choosing the command causes it to execute
  1040. immediately.  %@NL@%
  1041. %@NL@%
  1042. For example, the File menu contains both the Save and Save As... commands.
  1043. Choosing Save causes QuickC to save the current file with the current name
  1044. (the file name appearing at the top of the source window). Choosing Save
  1045. As... causes a dialog box to appear (see the following section). Within that
  1046. dialog box, you type the new name for your file.  %@NL@%
  1047. %@NL@%
  1048. %@NL@%
  1049. %@3@%%@CR:C6A00030008 @%%@AB@%Dialog Boxes%@AE@%%@EH@%%@NL@%
  1050. %@NL@%
  1051. Very often, invoking a menu command causes a dialog box to appear. For
  1052. example, Figure 3.2 shows the dialog box opened by the Options menu Display
  1053. command.  %@NL@%
  1054. %@NL@%
  1055. %@AU@%(This figure may be found in the printed book.)%@AE@%%@NL@%
  1056. %@NL@%
  1057. ────────────────────────────────────────────────────────────────────────────%@NL@%
  1058. NOTE
  1059.  
  1060. %@AI@%Dialog boxes usually offer a set of shortcut keys. Press %@AI@%ALT %@AE@%%@AI@%to see which
  1061. %@AI@%keys are active within a dialog box.%@AE@%%@AE@%%@NL@%
  1062. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  1063. %@NL@%
  1064. Dialog boxes can contain one or more of the items on the following list. Use
  1065. the TAB key to move between the various items in a dialog box.  %@NL@%
  1066. %@NL@%
  1067. Option Buttons ()                 Option buttons offer a list of choices, 
  1068.                                   of which you choose only one. Use the 
  1069.                                   arrow keys to move between the choices. 
  1070.                                   In Figure 3.2, four option buttons allow
  1071.                                   you to pick the screen color you prefer.
  1072.                                   These are sometimes called "radio 
  1073.                                   buttons" because they're similar to the 
  1074.                                   buttons on a car radio: pushing in one 
  1075.                                   button causes the others to pop out.
  1076.  
  1077. Check Box [X]                     A check box is a yes/no switch. If the 
  1078.                                   box is empty, the feature is turned off.
  1079.                                   If it contains a letter X, the feature 
  1080.                                   is on. Press the SPACEBAR to turn a 
  1081.                                   check box on or off. Use the TAB key to 
  1082.                                   move between check boxes.
  1083.  
  1084. Text Box [          ]             A text box contains text that you enter.
  1085.                                   In Figure 3.2, the setting for Tab Stops
  1086.                                   requires you to type in the number of 
  1087.                                   spaces to be inserted when you press the
  1088.                                   TAB key.
  1089.  
  1090. Command Buttons                   Command buttons enclosed in angle 
  1091. < OK >                            brackets pass commands to the dialog box.
  1092.                                   The OK button means you're satisfied 
  1093.                                   with the choices you've made. The Cancel
  1094.                                   button allows you to exit the dialog box
  1095.                                   with no changes. If one of the command 
  1096.                                   buttons is highlighted, pressing ENTER 
  1097.                                   invokes that command.
  1098.  
  1099. List Boxes                        Certain dialog boxes display the current
  1100.                                   disk directory inside a list box. If the
  1101.                                   number of files is too large for the 
  1102.                                   list box, you may use the arrow keys and
  1103.                                   PGUP/PGDN (keyboard) or click the scroll
  1104.                                   bar to move around the list (mouse).
  1105.  
  1106. %@NL@%
  1107. %@2@%%@CR:C6A00030009 @%%@AB@%Using the Editor%@AE@%%@EH@%%@NL@%
  1108. %@NL@%
  1109. QuickC's program editor is an important part of the QuickC environment. This
  1110. part of the chapter provides a brief overview of its many functions.  %@NL@%
  1111. %@NL@%
  1112. %@NL@%
  1113. %@3@%%@CR:C6A00030010 @%%@AB@%Moving Around in a Source File%@AE@%%@EH@%%@NL@%
  1114. %@NL@%
  1115. Many of the keys within the editor act as you would expect. The PGDN and
  1116. PGUP keys advance you forward or back within the source code. The HOME key
  1117. moves the cursor to the beginning of the current line. The END key moves the
  1118. cursor to the end of the current line. The arrow keys move the cursor one
  1119. character at a time. QuickC also has a command for moving around in a source
  1120. file: The Go to command in the Search menu moves the cursor to a specified
  1121. line number.  %@NL@%
  1122. %@NL@%
  1123. ────────────────────────────────────────────────────────────────────────────%@NL@%
  1124. NOTE
  1125.  
  1126. %@AI@%For a complete list of editor commands, use online help. Open the Help menu,
  1127. %@AI@%choose the Contents command, then get help about the Keyboard under the
  1128. %@AI@%Orientation heading.%@AE@%%@NL@%
  1129. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  1130. %@NL@%
  1131. You can invoke many of the editor commands in two different ways. For
  1132. example, to move one word to the right, you can press either CTRL+RIGHT or
  1133. CTRL+F. The second choice is part of the WordStar-compatible command set. If
  1134. you're familiar with WordStar commands, you already know how to use the
  1135. QuickC editor. There is one difference you should know: you don't use
  1136. separate commands to mark the beginning and end of a block of text.  %@NL@%
  1137. %@NL@%
  1138. %@NL@%
  1139. %@4@%%@AB@%Defining a Block%@AE@%%@EH@%%@NL@%
  1140. %@NL@%
  1141. While you're working on a C program, you may want to delete a large block of
  1142. text or copy it to another place in the program. To do this, you must define
  1143. the block:  %@NL@%
  1144. %@NL@%
  1145. Move the cursor to the beginning of the block. Hold down the SHIFT key and
  1146. move to the end of the block. Use the other editing keys (HOME, END,
  1147. CTRL+RIGHT, and so on) while you're holding down SHIFT to extend the block.
  1148. %@NL@%
  1149. %@NL@%
  1150. Move the mouse cursor to the beginning of the block. While holding down the
  1151. left button, move to the end of the block.  %@NL@%
  1152. %@NL@%
  1153. After defining a block, you can do several things: use the DELETE key to
  1154. erase it or use SHIFT+DEL to copy it into the Paste buffer (then use
  1155. SHIFT+INS to insert the buffer into the source file at the current cursor
  1156. location).  %@NL@%
  1157. %@NL@%
  1158. While a block is defined, anything you type will replace the defined text.  %@NL@%
  1159. %@NL@%
  1160. You can also press the TAB key to indent the entire block an additional tab
  1161. setting or SHIFT+TAB to remove all tab settings.  %@NL@%
  1162. %@NL@%
  1163. %@NL@%
  1164. %@3@%%@CR:C6A00030011 @%%@AB@%Customizing the Editor%@AE@%%@EH@%%@NL@%
  1165. %@NL@%
  1166. If you'd prefer to use another set of editing commands, QuickC comes with
  1167. four "key" files, which are files that define the keystrokes for editor
  1168. commands, along with a utility for making your own key file. The four key
  1169. files are QC.KEY, ME.KEY, BRIEF.KEY, and EPSILON.KEY. Refer to Appendix A
  1170. for a complete list of the commands they control (for example, the QuickC
  1171. and Microsoft editors use CTRL+E to move the cursor up, while Epsilon(tm)
  1172. uses CTRL+P).  %@NL@%
  1173. %@NL@%
  1174. To change to a new key file, use the /k: option when you run QuickC. For
  1175. example, to load the BRIEF.KEY file, enter this line, using just the file
  1176. name and not the fully qualified path:  %@NL@%
  1177. %@NL@%
  1178. %@AS@%  QC /k:BRIEF.KEY%@AE@%%@NL@%
  1179. %@NL@%
  1180. Your preference is automatically saved in the QC.INI file. In future editing
  1181. sessions, you won't need to specify the key file.  %@NL@%
  1182. %@NL@%
  1183. %@NL@%
  1184. %@4@%%@AB@%Creating Your Own Key File%@AE@%%@EH@%%@NL@%
  1185. %@NL@%
  1186. The MKKEY program allows you to make your own key file. You must use three
  1187. options: -c, -i, and -o. The first (-c) specifies the type of conversion:
  1188. ASCII to binary (ab) or binary to ASCII (ba). The two others specify the
  1189. input file (-i) and the output file (-o).  %@NL@%
  1190. %@NL@%
  1191. To modify the default QC.KEY file, you first convert it to an editable ASCII
  1192. file:  %@NL@%
  1193. %@NL@%
  1194. %@AS@%  MKKEY -c ba -i QC.KEY -o MYEDITOR.TXT%@AE@%%@NL@%
  1195. %@NL@%
  1196. You can use any text editor (including QuickC's) to edit the file named
  1197. MYEDITOR.TXT, which lists the keystrokes that perform certain actions. For
  1198. example, you press CTRL+G to delete a character. The line in MYEDITOR.TXT
  1199. looks like this:  %@NL@%
  1200. %@NL@%
  1201. %@AS@%  Del : CTRL+G%@AE@%%@NL@%
  1202. %@NL@%
  1203. You could change that command to any other keystroke (CTRL+D, for example),
  1204. as long as the key isn't already assigned to another function. Elsewhere in
  1205. the file, CTRL+D is assigned to CharRight, so you'd have to delete or change
  1206. that line if you wanted to use CTRL+D for the Del function.  %@NL@%
  1207. %@NL@%
  1208. When you're satisfied with the new functions, you must convert the ASCII
  1209. file to binary, so that it can be loaded into the QuickC editor:  %@NL@%
  1210. %@NL@%
  1211. %@AS@%  MKKEY -c ab -i MYEDITOR.TXT -o MYEDITOR.KEY%@AE@%%@NL@%
  1212. %@NL@%
  1213. Finally, to load the new key file, use the /k: option described above.  %@NL@%
  1214. %@NL@%
  1215. ────────────────────────────────────────────────────────────────────────────%@NL@%
  1216. NOTE
  1217.  
  1218. %@AI@%If you customize the QuickC editor by creating a key file, you are not
  1219. %@AI@%allowed to assign functions to CTRL+@%@AI@%.%@AE@%%@AE@%%@NL@%
  1220. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  1221. %@NL@%
  1222. %@NL@%
  1223. %@3@%%@CR:C6A00030012 @%%@AB@%Using Another Editor%@AE@%%@EH@%%@NL@%
  1224. %@NL@%
  1225. If you'd prefer to use your favorite word processor or text editor for
  1226. writing programs, use the Customize Menu command in the Utility menu. This
  1227. allows you to run any other program (including word processors) from within
  1228. the QuickC environment. When you exit the program, you'll return to QuickC.
  1229. %@NL@%
  1230. %@NL@%
  1231. To use another editor, choose the Customize Menu command in the Utility
  1232. menu. Highlight the Custom &Editor item and select the Edit button. List the
  1233. path and the name of the editor in the Path Name text box. (It isn't
  1234. necessary to include the .EXE extension.) For example, you could list
  1235. \BIN\B,\EDITORS\EPS or MYDIR\M. If you're using Brief, Epsilon, or the
  1236. Microsoft Editor, read the appropriate section below.  %@NL@%
  1237. %@NL@%
  1238. %@NL@%
  1239. %@4@%%@AB@%Brief%@AE@%%@EH@%%@NL@%
  1240. %@NL@%
  1241. Type the following in the Arguments text box:  %@NL@%
  1242. %@NL@%
  1243. %@AS@%  -m"editat $LINE $COL" $FILE%@AE@%%@NL@%
  1244. %@NL@%
  1245. Add the following macro to your Brief macro file:  %@NL@%
  1246. %@NL@%
  1247. %@AS@%  ;*** editat ─ interface to QC Utility.Edit menu
  1248. %@AS@%  ; SYNOPSIS
  1249. %@AS@%  ; b -m"editat $LINE $COL" $FILE
  1250. %@AS@%  ; DESCRIPTION
  1251. %@AS@%  ; editat positions Brief at the specified line and column in the
  1252. %@AS@%  ; current file.  It is invoked from the command line (i.e -m).
  1253. %@AS@%  ;*
  1254. %@AS@%  
  1255. %@AS@%  (macro editat
  1256. %@AS@%     (
  1257. %@AS@%        (int line col)
  1258. %@AS@%  
  1259. %@AS@%        (get_parm 0 line)
  1260. %@AS@%        (get_parm 1 col)
  1261. %@AS@%        (move_abs line col)
  1262. %@AS@%     )
  1263. %@AS@%  )%@AE@%%@NL@%
  1264. %@NL@%
  1265. %@NL@%
  1266. %@4@%%@AB@%Epsilon%@AE@%%@EH@%%@NL@%
  1267. %@NL@%
  1268. Type the following in the Arguments text box:  %@NL@%
  1269. %@NL@%
  1270. %@AS@%  $FILE +$LINE%@AE@%%@NL@%
  1271. %@NL@%
  1272. %@NL@%
  1273. %@4@%%@AB@%M Editor%@AE@%%@EH@%%@NL@%
  1274. %@NL@%
  1275. Type the following in the Arguments text box:  %@NL@%
  1276. %@NL@%
  1277. %@AS@%  /e "Arg \"$LINE\" Mark" $FILE%@AE@%%@NL@%
  1278. %@NL@%
  1279. %@NL@%
  1280. %@2@%%@CR:C6A00030013 @%%@AB@%Compiling and Linking%@AE@%%@EH@%%@NL@%
  1281. %@NL@%
  1282. Your ultimate goal in writing C programs is to create an executable program.
  1283. To convert a C source file to a runnable program, you must compile and link
  1284. it. This section introduces the commands that compile and link programs, a
  1285. process called "building."  %@NL@%
  1286. %@NL@%
  1287. When QuickC builds a program, it performs two steps:  %@NL@%
  1288. %@NL@%
  1289. %@NL@%
  1290.   1.  It compiles the .C source file into an object (.OBJ) file.%@NL@%
  1291. %@NL@%
  1292.   2.  It links the object file with other object files or libraries to
  1293.       create an executable (.EXE) file.%@NL@%
  1294. %@NL@%
  1295. %@NL@%
  1296. Although you have the option of going through these two steps, it's
  1297. generally easier and more convenient to build a program with a single
  1298. command.  %@NL@%
  1299. %@NL@%
  1300. %@NL@%
  1301. %@3@%%@CR:C6A00030014 @%%@AB@%Building within the QuickC Environment%@AE@%%@EH@%%@NL@%
  1302. %@NL@%
  1303. This section illustrates how to compile and link a C program. First, type in
  1304. this program and use the Save As command in the File menu to save the file
  1305. as HI.C:  %@NL@%
  1306. %@NL@%
  1307. %@AS@%  /* HI.C: Prints hello and a name */
  1308. %@AS@%  
  1309. %@AS@%  #include <stdio.h>
  1310. %@AS@%  
  1311. %@AS@%  main()
  1312. %@AS@%  {
  1313. %@AS@%     char name[80];
  1314. %@AS@%  
  1315. %@AS@%     printf( "Type your name, please.\n" );
  1316. %@AS@%     gets( name );
  1317. %@AS@%     printf( "Hello, %s\n", name );
  1318. %@AS@%  }%@AE@%%@NL@%
  1319. %@NL@%
  1320. The output of this simple program tells you to type your name. You enter any
  1321. string of characters, and it says hello to you.  %@NL@%
  1322. %@NL@%
  1323. The program calls two library functions: %@AB@%printf%@AE@% and %@AB@%gets%@AE@%. For more
  1324. information about what these functions do, use the online help system.
  1325. Position the cursor on the function name and press F1. To close the Help
  1326. window, press ESC. Online help is explained in greater detail in the next
  1327. chapter.  %@NL@%
  1328. %@NL@%
  1329. ────────────────────────────────────────────────────────────────────────────%@NL@%
  1330. NOTE
  1331.  
  1332. %@AI@%By default, QuickC names a new file UNTITLED.C. You should always explicitly
  1333. %@AI@%name your file before you compile.%@AE@%%@NL@%
  1334. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  1335. %@NL@%
  1336. %@NL@%
  1337. %@4@%%@AB@%Compiling and Linking%@AE@%%@EH@%%@NL@%
  1338. %@NL@%
  1339. To build a program, open the Make menu and choose Build Program. Or use one
  1340. of these shortcuts:  %@NL@%
  1341. %@NL@%
  1342. Press SHIFT+F5 to build the program.  %@NL@%
  1343. %@NL@%
  1344. Click the %@AS@%<Shift+F5=Restart>%@AE@% button on the reference bar at the bottom of
  1345. the screen.  %@NL@%
  1346. %@NL@%
  1347. A dialog box appears on the screen to show you how far the compiler and
  1348. linker have progressed. The compiler or linker may halt if anything goes
  1349. wrong. When the source file contains errors, the Errors window appears and
  1350. the offending line is highlighted in the source window.  %@NL@%
  1351. %@NL@%
  1352. Note that incremental linking uses expanded memory, as defined by the
  1353. Lotus-Intel-Microsoft (LIM) specification versions 3.2 and higher, if it is
  1354. available. If you have installed additional memory on an 80286 or 80386
  1355. system, you may encounter problems when linking incrementally, especially if
  1356. you have configured the board to use both extended and expanded memory. In
  1357. particular, your computer may lock up if you use incremental linking in
  1358. conjunction with a Talltrees AT3 expanded memory board. (Other boards may or
  1359. may not be subject to this problem.) If this happens, you have several
  1360. choices:  %@NL@%
  1361. %@NL@%
  1362. %@NL@%
  1363.   ■   Contact the manufacturer of the memory board for information on
  1364.       solving this problem.%@NL@%
  1365. %@NL@%
  1366.   ■   Remove the Expanded Memory Manager (EMM) device driver and continue to
  1367.       link incrementally.%@NL@%
  1368. %@NL@%
  1369.   ■   Disable extended memory (used by VDISK) and continue to link
  1370.       incrementally.%@NL@%
  1371. %@NL@%
  1372.   ■   Leave the memory device driver in place, but turn off incremental
  1373.       linking. From the QuickC environment, choose the Make command in the
  1374.       Options menu and select the Linker Flags button. From the command
  1375.       line, avoid the /Li option.%@NL@%
  1376. %@NL@%
  1377.   ■   Contact Microsoft Product Support for additional suggestions.%@NL@%
  1378. %@NL@%
  1379. %@NL@%
  1380. %@NL@%
  1381. %@4@%%@AB@%Running the Program%@AE@%%@EH@%%@NL@%
  1382. %@NL@%
  1383. When the program has been built, the reference bar displays several new
  1384. items, including %@AS@% <F5=Run>%@AE@%. To run the program, open the Run menu and choose
  1385. Go. Or use the shortcuts:  %@NL@%
  1386. %@NL@%
  1387. Press F5.  %@NL@%
  1388. %@NL@%
  1389. Click %@AS@% <F5=Run> %@AE@% on the reference bar.  %@NL@%
  1390. %@NL@%
  1391. %@NL@%
  1392. %@4@%%@AB@%Compiling, Linking, and Running%@AE@%%@EH@%%@NL@%
  1393. %@NL@%
  1394. It's not necessary to press SHIFT+F5 (to build the program) before you press
  1395. F5 (to run it). If you simply press F5, the QuickC editor knows if the
  1396. source code in memory has changed. If it %@AI@%has%@AE@% changed, you'll be asked if you
  1397. want to rebuild the program.  %@NL@%
  1398. %@NL@%
  1399. %@NL@%
  1400. %@4@%%@AB@%Viewing the Output Window%@AE@%%@EH@%%@NL@%
  1401. %@NL@%
  1402. When you choose Go from the Run menu (or press F5), the output is
  1403. automatically directed to the output screen. To see this output:  %@NL@%
  1404. %@NL@%
  1405. Press F4 to toggle between the two screens.  %@NL@%
  1406. %@NL@%
  1407. Open the View window and choose Output Screen. Click once to return to the
  1408. source window.  %@NL@%
  1409. %@NL@%
  1410. If you'd prefer to have both the Output and source windows visible at the
  1411. same time, choose the Windows command from the View menu and then choose
  1412. Output.  %@NL@%
  1413. %@NL@%
  1414. %@NL@%
  1415. %@4@%%@AB@%Saving the Program%@AE@%%@EH@%%@NL@%
  1416. %@NL@%
  1417. To save the source file using the current name, go to the File menu and
  1418. choose either Save or Save As. If you use Save, QuickC automatically saves
  1419. the file under the name listed on the top line of the source window. If you
  1420. prefer to use another name, choose Save As. The following dialog box
  1421. appears:  %@NL@%
  1422. %@NL@%
  1423. %@AU@%(This figure may be found in the printed book.)%@AE@%%@NL@%
  1424. %@NL@%
  1425. Type in the new name of the source file. If you don't add an extension,
  1426. QuickC automatically adds .C (HI becomes HI.C, for example).  %@NL@%
  1427. %@NL@%
  1428. %@NL@%
  1429. %@3@%%@CR:C6A00030015 @%%@AB@%Building from Multiple Source Files%@AE@%%@EH@%%@NL@%
  1430. %@NL@%
  1431. Now we'll make things a little more complicated by writing a multiple-module
  1432. program.  %@NL@%
  1433. %@NL@%
  1434. First, edit the HI.C program, adding a few lines:  %@NL@%
  1435. %@NL@%
  1436. %@AS@%  /* HIA.C: Illustrates external functions */
  1437. %@AS@%  
  1438. %@AS@%  #include <stdio.h>
  1439. %@AS@%  
  1440. %@AS@%  main()
  1441. %@AS@%  {
  1442. %@AS@%     char name[80];
  1443. %@AS@%  
  1444. %@AS@%     welcome();
  1445. %@AS@%     outsider();
  1446. %@AS@%     printf( "Type your name, please.\n" );
  1447. %@AS@%     gets( name );
  1448. %@AS@%     printf( "Hello, %s\n", name );
  1449. %@AS@%  }
  1450. %@AS@%  welcome()
  1451. %@AS@%  {
  1452. %@AS@%     printf( "Welcome to the program.\n" );
  1453. %@AS@%  }%@AE@%%@NL@%
  1454. %@NL@%
  1455. The %@AS@% main %@AE@% function calls two new functions: %@AS@% welcome %@AE@% and %@AS@% outsider%@AE@%. Unlike
  1456. %@AS@% printf %@AE@% and %@AS@% gets%@AE@%, which are library functions, %@AS@% welcome %@AE@% and %@AS@%outsider%@AE@% are
  1457. functions defined within the program. Note the definition of %@AS@% welcome %@AE@% below
  1458. the %@AS@% main %@AE@% function.  %@NL@%
  1459. %@NL@%
  1460. Don't compile the program yet. Save it as HIA.C and then choose New from the
  1461. File menu. Type in this second program:  %@NL@%
  1462. %@NL@%
  1463. %@AS@%  /* HIB.C: Second program for HIA.C */
  1464. %@AS@%  
  1465. %@AS@%  outsider()
  1466. %@AS@%  {
  1467. %@AS@%     printf( "This line is from the HIB.C file.\n" );
  1468. %@AS@%  }%@AE@%%@NL@%
  1469. %@NL@%
  1470. Save it as HIB.C. Now there are two source files on your disk: HIA.C and
  1471. HIB.C.  %@NL@%
  1472. %@NL@%
  1473. There are several reasons to split a file into multiple modules. If you
  1474. write a function that's used in several programs, you can give it its own
  1475. source file. If you write long programs, splitting the file up makes editing
  1476. easier. In addition, the Build Program command takes less time because it
  1477. recompiles only the source files you've changed, instead of the entire
  1478. program.  %@NL@%
  1479. %@NL@%
  1480. %@NL@%
  1481. %@4@%%@AB@%Creating a Program List%@AE@%%@EH@%%@NL@%
  1482. %@NL@%
  1483. Since the example program now uses two source files, we must create a
  1484. program list (also called a "make file") that tells QuickC which source
  1485. files should be compiled.  %@NL@%
  1486. %@NL@%
  1487. Open the Make menu and choose Set Program List (you must have Full Menus
  1488. enabled). Type the name HIA.MAK as the name of the file containing the
  1489. program list (the MAK extension is used for make files), and when QuickC
  1490. asks if it should create the file, press ENTER.  %@NL@%
  1491. %@NL@%
  1492. The following dialog box appears:  %@NL@%
  1493. %@NL@%
  1494. %@AU@%(This figure may be found in the printed book.)%@AE@%%@NL@%
  1495. %@NL@%
  1496. Now you must add both HIA.C and HIB.C to the list of programs.  %@NL@%
  1497. %@NL@%
  1498. Press TAB until the cursor is within the list box containing the directory
  1499. of C source files (another list box lists the directory names). Use the
  1500. arrow keys to move to the HIA.C file. Press ENTER and the file name will
  1501. appear in the program list below. Repeat this action to add HIB.C to the
  1502. program list. (A second option is to type the file names in the text box at
  1503. the top of the screen.) When you're finished, press TAB until the Save List
  1504. command button is highlighted, and then press ENTER.  %@NL@%
  1505. %@NL@%
  1506. Click HIA.C once and click the Add/Delete button (or just double-click
  1507. HIA.C). Do the same for HIB.C. When both programs appear in the program
  1508. list, click the Save List command button to save the make file.  %@NL@%
  1509. %@NL@%
  1510. This program list tells QuickC that several source files are to be combined
  1511. into one program.  %@NL@%
  1512. %@NL@%
  1513. ────────────────────────────────────────────────────────────────────────────%@NL@%
  1514. NOTE
  1515.  
  1516. %@AI@%Within a program list, you can include source files (ending with the .C
  1517. %@AI@%extension), object files (.OBJ), or libraries (.LIB). For example, if you
  1518. %@AI@%didn't include graphics in the combined library when you ran the SETUP
  1519. %@AI@%program, you can place GRAPHICS.LIB in the program list to gain access to
  1520. %@AI@%graphics functions.%@AE@%%@NL@%
  1521. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  1522. %@NL@%
  1523. Notice that the base name of the program list (HIA.MAK) matches the name of
  1524. one of the source files (HIA.C). Because the names match, when you load
  1525. HIA.C in the future, QuickC will ask if you wish to use the program list
  1526. HIA.MAK. You don't have to give the source file and the make file the same
  1527. names, but it's a good idea to do so.  %@NL@%
  1528. %@NL@%
  1529. The order that you list the files is inconsequential. It doesn't matter
  1530. which file is first or second.  %@NL@%
  1531. %@NL@%
  1532. When you choose the Rebuild All command from the Make menu, every .C file in
  1533. the program list is compiled into a .OBJ file. Then all of the .OBJ files
  1534. are linked with .LIB files to create one .EXE file.  %@NL@%
  1535. %@NL@%
  1536. However, if you press SHIFT+F5 or choose the Build Program command, QuickC
  1537. checks the time and date stamps on the source and object files. If the
  1538. source code has not changed since the last time a Build Program command
  1539. executed, there's no need to recompile the unchanged .OBJ files. Any files
  1540. that have changed are recompiled; the others are not. This means the Build
  1541. command is often faster than the Rebuild All command when you have multiple
  1542. source files.  %@NL@%
  1543. %@NL@%
  1544. %@NL@%
  1545. %@4@%%@AB@%About Directories%@AE@%%@EH@%%@NL@%
  1546. %@NL@%
  1547. You can change directories whenever you open or save a file:  %@NL@%
  1548. %@NL@%
  1549. Press TAB until the cursor is within the Drives/Dirs: list box containing
  1550. the directory names (see Figure 3.4). Use the arrow keys to move to the
  1551. desired directory, and press ENTER.  %@NL@%
  1552. %@NL@%
  1553. Double-click the name of the desired directory.  %@NL@%
  1554. %@NL@%
  1555. To move to the parent directory, select the two periods (..) at the top of
  1556. the list.  %@NL@%
  1557. %@NL@%
  1558. When you exit QuickC, you return to the directory you started (the default
  1559. directory), regardless of how many other directories you may have accessed.
  1560. %@NL@%
  1561. %@NL@%
  1562. QuickC puts all object (.OBJ) files and executable (.EXE) files in the
  1563. default directory. For example, suppose you run QuickC from the C:\ZEBRA
  1564. directory and open the file TAPIR.C from the C:\AARDVARK directory. Because
  1565. ZEBRA is the default directory, the files TAPIR.OBJ and TAPIR.EXE are
  1566. created in the ZEBRA directory when you compile the program. If you prefer
  1567. to keep all related files in the AARDVARK directory, choose the Run DOS
  1568. Command from the Utility menu and type  %@NL@%
  1569. %@NL@%
  1570. %@AS@%  CHDIR \AARDVARK%@AE@%%@NL@%
  1571. %@NL@%
  1572. The CHDIR directory command redirects the object and executable files to the
  1573. other directory.  %@NL@%
  1574. %@NL@%
  1575. %@NL@%
  1576. %@3@%%@CR:C6A00030016 @%%@AB@%Compiling and Linking from the Command Line%@AE@%%@EH@%%@NL@%
  1577. %@NL@%
  1578. If you're new to the C language, you can skip this section. You don't need
  1579. to know how to compile and link from the command line; you can do everything
  1580. within the QuickC environment.  %@NL@%
  1581. %@NL@%
  1582. However, if you want to, you can exit the QuickC environment to build
  1583. programs from the DOS prompt. This gives you slightly more control over the
  1584. various options. In addition, if you're building a series of related
  1585. executable programs, you can either put the compile and link commands in a
  1586. batch file or create your own make file. Either method is faster than
  1587. building programs individually.  %@NL@%
  1588. %@NL@%
  1589. The program that builds from the command line is called QCL.EXE (the C and L
  1590. in the file name stand for "Compile" and "Link"). To build the HI.EXE
  1591. program, type this:  %@NL@%
  1592. %@NL@%
  1593. %@AS@%  QCL HI.C%@AE@%%@NL@%
  1594. %@NL@%
  1595. You can include a variety of command-line options between QCL and the file
  1596. name. For example,  %@NL@%
  1597. %@NL@%
  1598. %@AS@%  QCL /AM HI.C%@AE@%%@NL@%
  1599. %@NL@%
  1600. forces the linker to use the medium memory model (the default is the small
  1601. model). If you try this example, you must have a medium memory model library
  1602. installed. You will find a complete list of compiler and linker options in
  1603. the %@AI@%Microsoft QuickC Tool Kit%@AE@% manual (or type %@AS@% QCL /help%@AE@%).  %@NL@%
  1604. %@NL@%
  1605. QCL can also build multiple-module programs. Since HIA.C and HIB.C are two
  1606. parts of a multiple-module program, the following line does %@AI@%not%@AE@% build a
  1607. program:  %@NL@%
  1608. %@NL@%
  1609. %@AS@%  QCL HIA.C%@AE@%%@NL@%
  1610. %@NL@%
  1611. The compiler works correctly, creating a .OBJ file, but when the linker
  1612. looks for the %@AS@% outsider %@AE@% function (which is in HIB.C), it fails and returns
  1613. the error %@AS@%unresolved external%@AE@%.  %@NL@%
  1614. %@NL@%
  1615. One solution is to specify both source files:  %@NL@%
  1616. %@NL@%
  1617. %@AS@%  QCL HIA.C HIB.C%@AE@%%@NL@%
  1618. %@NL@%
  1619. The example above builds a program called HIA.EXE because HIA.C is listed
  1620. first.  %@NL@%
  1621. %@NL@%
  1622. Another solution is to compile the two files and then link them yourself:  %@NL@%
  1623. %@NL@%
  1624. %@AS@%  QCL /c HIA.C
  1625. %@AS@%  QCL /c HIB.C
  1626. %@AS@%  QLINK HIA.OBJ HIB.OBJ%@AE@%%@NL@%
  1627. %@NL@%
  1628. The /c option tells the QCL program to compile but not link. It must be
  1629. entered as a lowercase character.  %@NL@%
  1630. %@NL@%
  1631. Since you created a make file called HIA.MAK, which contained the program
  1632. list, you can also use the NMAKE program to build HIA.EXE. Simply pass it
  1633. the name of the make file:  %@NL@%
  1634. %@NL@%
  1635. %@AS@%  NMAKE /F HIA.MAK%@AE@%%@NL@%
  1636. %@NL@%
  1637. For a complete list of compiler, linker, and NMAKE options, see %@AI@%Microsoft
  1638. %@AI@%QuickC Tool Kit%@AE@%.  %@NL@%
  1639. %@NL@%
  1640. The -qc option allows you to run the QuickC compiler from Microsoft C
  1641. Professional Development System version 6.0. To use the QuickC compiler from
  1642. Microsoft C use the command line  %@NL@%
  1643. %@NL@%
  1644. %@AS@%  CL = B1 qccom -qc%@AE@%%@NL@%
  1645. %@NL@%
  1646. QuickC ships with the QLINK linker, a subset of LINK.  %@NL@%
  1647. %@NL@%
  1648. %@NL@%
  1649. %@2@%%@CR:C6A00030017 @%%@AB@%The Debugger%@AE@%%@EH@%%@NL@%
  1650. %@NL@%
  1651. When you make obvious mistakes like misspelling a function name or
  1652. forgetting to end a line with a semicolon, your code causes a compile-time
  1653. error. The compiler (or linker) refuses to continue until you fix the
  1654. mistake.  %@NL@%
  1655. %@NL@%
  1656. Other mistakes cause run-time errors. Attempting to divide by zero is one
  1657. such example.  %@NL@%
  1658. %@NL@%
  1659. Still other mistakes are called logic errors. When a program includes a
  1660. logic error, it may run, but it eventually acts unpredictably or yields
  1661. incorrect results.  %@NL@%
  1662. %@NL@%
  1663. QuickC's built-in debugger helps you track down and correct logic errors. In
  1664. the Run menu, you'll find Trace Into and Step Over, which execute the
  1665. program in memory line by line. Trace Into follows functions when they're
  1666. called; Step Over lets you execute a function without showing its inner
  1667. workings.  %@NL@%
  1668. %@NL@%
  1669. You can use the Debug menu to set watchpoints and breakpoints and run a
  1670. program up to the breakpoint.  %@NL@%
  1671. %@NL@%
  1672. The Watch Value command from the Debug menu is also useful. You enter one or
  1673. more variable names and then monitor their values as you step through the
  1674. program. There's no need to place %@AB@%printf%@AE@% statements at various points in a
  1675. program just to monitor the value of a variable. The Quickwatch command
  1676. gives you even faster access to variables or expressions you want to watch.
  1677. %@NL@%
  1678. %@NL@%
  1679. If you turn on Debugging History, the debugger records everything that
  1680. happens during the session. Later, you can review the events and watch for
  1681. the logic error.  %@NL@%
  1682. %@NL@%
  1683. The online tutorial includes a lesson explaining how to use the debugger,
  1684. with a special section devoted to using Debugging History. If you're
  1685. interested in exploring this topic, run the LEARN program from the command
  1686. line or choose the Learn QuickC command from the Utility menu. You can also
  1687. consult online help for detailed information about the debugger.  %@NL@%
  1688. %@NL@%
  1689. ────────────────────────────────────────────────────────────────────────────%@NL@%
  1690. IMPORTANT
  1691.  
  1692. %@AI@%The CodeView debugger cannot handle files that have been incrementally
  1693. %@AI@%compiled or incrementally linked. If you plan to examine QuickC programs
  1694. %@AI@%with CodeView, be sure the incremental compiling and linking options are
  1695. %@AI@%turned off. From the command line, use QCL without the /Gi or /Li options.
  1696. %@AI@%From the QuickC environment, use the Make command from the Options menu to
  1697. %@AI@%turn off incremental compiling and linking and to turn on CodeView info.
  1698. %@AI@%This restriction applies only to CodeView. QuickC's built-in debugger can
  1699. %@AI@%handle incrementally compiled and linked programs.%@AE@%%@NL@%
  1700. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  1701. %@NL@%
  1702. %@NL@%
  1703. %@NL@%
  1704. %@NL@%
  1705. %@NL@%
  1706. %@NL@%
  1707. %@CR:C6A00040001 @%%@1@%%@AB@%Chapter 4  Getting Help%@AE@%%@EH@%%@NL@%
  1708. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1709. %@NL@%
  1710. The QuickC Compiler environment offers a complete online reference system
  1711. called the Microsoft Advisor. The Microsoft Advisor provides information on
  1712. the C language, run-time libraries, and utilities provided with QuickC.  %@NL@%
  1713. %@NL@%
  1714. The first section of this chapter, "Structure of the Microsoft Advisor,"
  1715. outlines the structure and contents of the help database. The second
  1716. section, "Navigating through the Microsoft Advisor," takes you on a quick
  1717. tour of the system.  %@NL@%
  1718. %@NL@%
  1719. %@NL@%
  1720. %@2@%%@CR:C6A00040002 @%%@AB@%Structure of the Microsoft Advisor%@AE@%%@EH@%%@NL@%
  1721. %@NL@%
  1722. The Microsoft Advisor can be compared to a librarian managing a collection
  1723. of books. Each book, or help file, has its own table of contents, index, and
  1724. pages of information. The Advisor organizes the books with an overall table
  1725. of contents and index. All of the books are listed, and their specific
  1726. tables of contents and indexes can be accessed through the overall
  1727. references. The global contents screen is shown in Figure 4.1.  %@NL@%
  1728. %@NL@%
  1729. %@AU@%(This figure may be found in the printed book.)%@AE@%%@NL@%
  1730. %@NL@%
  1731. You can access a variety of information from the online reference system.
  1732. Information regarding the C language, run-time libraries, errors, and the
  1733. reference system itself can all be displayed.  %@NL@%
  1734. %@NL@%
  1735. %@NL@%
  1736. %@2@%%@CR:C6A00040003 @%%@AB@%Navigating through the Microsoft Advisor%@AE@%%@EH@%%@NL@%
  1737. %@NL@%
  1738. You request information about a topic in a window by positioning the cursor
  1739. over it and pressing F1. The help system then searches through the help
  1740. files for information about the topic. If it finds the topic, the help
  1741. system displays information in the Help window. If help cannot be found for
  1742. a particular word or symbol, a message informs you that no information is
  1743. associated with the topic. Sometimes, a topic with the same name occurs in
  1744. several help files. In such cases, a dialog box is displayed in which you
  1745. can select the context of the topic.  %@NL@%
  1746. %@NL@%
  1747. %@NL@%
  1748. %@3@%%@CR:C6A00040004 @%%@AB@%Using the Help Menu%@AE@%%@EH@%%@NL@%
  1749. %@NL@%
  1750. The simplest method for accessing the online reference is with the commands
  1751. found in the Help menu. All of these commands present information in the
  1752. Help window.  %@NL@%
  1753. %@NL@%
  1754. %@AB@%Command%@AE@%                           %@AB@%Description%@AE@%
  1755. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1756. Index                             Displays the alphabetical index of 
  1757.                                   help-file categories (see Figure 4.2).
  1758.  
  1759. Contents                          Displays the global contents screen for 
  1760.                                   the categories found in the help files.
  1761.  
  1762. Topic:                            Provides information about the topic 
  1763.                                   that the cursor is currently positioned 
  1764.                                   over. If information about the topic is 
  1765.                                   available, the topic's name is appended 
  1766.                                   to the Topic: command. Otherwise, this 
  1767.                                   menu option is grayed.
  1768.  
  1769. Help on Help                      Displays information about using the 
  1770.                                   online reference itself.
  1771.  
  1772. %@AU@%(This figure may be found in the printed book.)%@AE@%%@NL@%
  1773. %@NL@%
  1774. ────────────────────────────────────────────────────────────────────────────%@NL@%
  1775. NOTE
  1776.  
  1777. %@AI@%SHIFT+F1%@AI@% is the shortcut key for the Help on Help menu command. If you have
  1778. %@AI@%a terminate-and-stay-resident (TSR) utility such as the Norton Guides%@AE@%%@AI@%(tm)%@AE@%%@AI@%
  1779. %@AI@%installed and you invoke that program with SHIFT+F1%@AE@%%@AI@%, then you can't use
  1780. %@AI@%SHIFT+F1%@AE@%%@AI@% as a shortcut to Help on Help. Choose Help on Help from the Help
  1781. %@AI@%menu instead, or change the key that invokes the TSR.%@AE@%%@AE@%%@NL@%
  1782. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  1783. %@NL@%
  1784. %@NL@%
  1785. %@3@%%@CR:C6A00040005 @%%@AB@%Using the F1 Key%@AE@%%@EH@%%@NL@%
  1786. %@NL@%
  1787. You can use the F1 key to get information about any menu command or QuickC
  1788. dialog box, as well as information on C keywords, operators, and library
  1789. functions.  %@NL@%
  1790. %@NL@%
  1791. %@NL@%
  1792. %@4@%%@AB@%Menu Help%@AE@%%@EH@%%@NL@%
  1793. %@NL@%
  1794. To view information about a menu item, first pull down the menu, then  %@NL@%
  1795. %@NL@%
  1796. Use the cursor keys to highlight the command and press F1.  %@NL@%
  1797. %@NL@%
  1798. Move the mouse cursor on the command and click the Right mouse button.  %@NL@%
  1799. %@NL@%
  1800. Figure 4.3 shows the help information for the Cut command in the Edit menu.
  1801. %@NL@%
  1802. %@NL@%
  1803. %@AU@%(This figure may be found in the printed book.)%@AE@%%@NL@%
  1804. %@NL@%
  1805. %@NL@%
  1806. %@4@%%@AB@%Keyword and Library-Function Help%@AE@%%@EH@%%@NL@%
  1807. %@NL@%
  1808. To view information about a C keyword, operator, or run-time library
  1809. function,  %@NL@%
  1810. %@NL@%
  1811. Put the cursor on the keyword or function name and press F1.  %@NL@%
  1812. %@NL@%
  1813. Click on the command with the Right mouse button.  %@NL@%
  1814. %@NL@%
  1815. %@NL@%
  1816. %@4@%%@AB@%Dialog-Box Help%@AE@%%@EH@%%@NL@%
  1817. %@NL@%
  1818. To view information about a QuickC dialog box, simply press F1 while the
  1819. dialog box is displayed, or click on the Help button.  %@NL@%
  1820. %@NL@%
  1821. %@NL@%
  1822. %@3@%%@CR:C6A00040006 @%%@AB@%Using Hyperlinks%@AE@%%@EH@%%@NL@%
  1823. %@NL@%
  1824. Hyperlinks are cross-references that connect related topic information.  %@NL@%
  1825. %@NL@%
  1826. Hyperlinks enclosed by the < and > characters are called "buttons." Navigate
  1827. through the online help system by using these buttons.  %@NL@%
  1828. %@NL@%
  1829. You can press TAB to move to the next hyperlink button within the current
  1830. help window. SHIFT+TAB moves back to the previous button. Typing any letter
  1831. moves the cursor to the next button that begins with the letter; holding
  1832. SHIFT down and typing a letter moves the cursor backward.  %@NL@%
  1833. %@NL@%
  1834. The Microsoft Advisor also recognizes C keywords, library functions,
  1835. constants defined by QuickC, and similar identifiers as hyperlinks, but they
  1836. are unmarked hyperlinks. Unmarked hyperlinks are recognized by the Microsoft
  1837. Advisor wherever they appear in the help-information text or %@AI@%in your source
  1838. %@AI@%code%@AE@%. However, an unmarked hyperlink is not delimited with the < and >
  1839. characters, and you can't move to it with the TAB key. An unmarked hyperlink
  1840. can only be executed by placing the cursor on it and pressing F1, or
  1841. pointing to it with the mouse cursor and clicking the Right mouse button.  %@NL@%
  1842. %@NL@%
  1843. You can access a hyperlink in several ways. First move either the mouse or
  1844. text cursor to a hyperlink, then  %@NL@%
  1845. %@NL@%
  1846. Press F1.  %@NL@%
  1847. %@NL@%
  1848. Click the Left mouse button twice (double-click). Then click the Right mouse
  1849. button once.  %@NL@%
  1850. %@NL@%
  1851. Highlighted button hyperlinks can also be executed by pressing ENTER or the
  1852. SPACEBAR.  %@NL@%
  1853. %@NL@%
  1854. Any of these actions displays information about the topic the cursor is
  1855. positioned on. If the topic isn't a hyperlink, a message informs you that no
  1856. information on the topic could be found.  %@NL@%
  1857. %@NL@%
  1858. %@NL@%
  1859. %@3@%%@CR:C6A00040007 @%%@AB@%Using Help Windows and Dialog Boxes%@AE@%%@EH@%%@NL@%
  1860. %@NL@%
  1861. The Microsoft Advisor displays information in windows or dialog boxes. Help
  1862. windows and dialog boxes function the same as other QuickC windows and
  1863. dialog boxes. For a complete description of windows and dialog boxes, refer
  1864. to Chapter 3, "Using QuickC."  %@NL@%
  1865. %@NL@%
  1866. %@NL@%
  1867. %@4@%%@AB@%Using the Help Window%@AE@%%@EH@%%@NL@%
  1868. %@NL@%
  1869. The help window displays various contents, indexes, and information about
  1870. selected topics. Some screens of information are larger than the help
  1871. window; information beyond the window borders can be viewed by using the
  1872. scroll bars or the arrow keys. The  -  -  symbol indicates the end of
  1873. information in the help  window.  %@NL@%
  1874. %@NL@%
  1875. %@NL@%
  1876. %@4@%%@AB@%Navigating with Hyperlink Buttons%@AE@%%@EH@%%@NL@%
  1877. %@NL@%
  1878. At the top of the Help window is a group of hyperlink buttons that are
  1879. useful for moving through the reference system:  %@NL@%
  1880. %@NL@%
  1881. %@AB@%Button%@AE@%                            %@AB@%Description%@AE@%
  1882. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1883. < Up >                            Moves upward in the hierarchy of help 
  1884.                                   screens. Since information is ordered in
  1885.                                   a logical way, moving from the general 
  1886.                                   to the specific, this command is useful 
  1887.                                   for moving up the information tree.
  1888.  
  1889. < Contents >                      Displays the global contents screen. 
  1890.                                   This command is useful because it always
  1891.                                   returns you to a known point in the 
  1892.                                   online help system hierarchy.
  1893.  
  1894. < Index >                         Displays the index list. Selecting a 
  1895.                                   letter from the list displays the index 
  1896.                                   for entries beginning with that
  1897.                                   letter.
  1898.  
  1899. < Back >                          Moves you to the last online help screen
  1900.                                   you saw.
  1901.  
  1902. Screens on a particular topic frequently are physically grouped together in
  1903. a help file. You can press CTRL+F1 to display information about the next
  1904. physical topic in the help file.  %@NL@%
  1905. %@NL@%
  1906. %@NL@%
  1907. %@4@%%@AB@%Viewing the Previous Help Screen%@AE@%%@EH@%%@NL@%
  1908. %@NL@%
  1909. The Microsoft Advisor remembers the last 20 help screens you've accessed. To
  1910. return to a previous screen, use the "Back" button or hold down the ALT key
  1911. and press F1 as many times as necessary to return to the screen you want to
  1912. see. The help screen that appears is active; you can ask for help on any of
  1913. its hyperlinks or topics.  %@NL@%
  1914. %@NL@%
  1915. You can always return to the global contents screen by pressing SHIFT+F1.  %@NL@%
  1916. %@NL@%
  1917. %@NL@%
  1918. %@4@%%@AB@%Copying and Pasting Information%@AE@%%@EH@%%@NL@%
  1919. %@NL@%
  1920. Any text that appears in the help window can easily be copied to another
  1921. window. For example, to test an example program from the help window, you
  1922. only have to copy it to the source window and compile it.  %@NL@%
  1923. %@NL@%
  1924. To copy and paste with the keyboard, follow these steps:  %@NL@%
  1925. %@NL@%
  1926. %@NL@%
  1927.   1.  Move the cursor to the beginning or the end of the text you want to
  1928.       select. Hold down the SHIFT key and move the cursor to the other end
  1929.       of the text. The text is now highlighted.%@NL@%
  1930. %@NL@%
  1931.   2.  Execute the Copy command: press ALT to activate the menus, E for Edit,
  1932.       then C for Copy. Note that the menu lists the shortcut command
  1933.       (CTRL+INS), which can be substituted for ALT+E, then C.%@NL@%
  1934. %@NL@%
  1935.   3.  Press F6 to switch to another window. Position the cursor where you
  1936.       want to insert the text, and execute the Paste command: ALT+E, then P,
  1937.       or use the SHIFT+INS shortcut. The text from the help window is
  1938.       inserted at the current cursor position.%@NL@%
  1939. %@NL@%
  1940. %@NL@%
  1941. To copy and paste using the mouse, follow these steps:  %@NL@%
  1942. %@NL@%
  1943. %@NL@%
  1944.   1.  Click the Left mouse button and drag the cursor (hold the button down
  1945.       while moving the mouse) to select the text you want to copy.%@NL@%
  1946. %@NL@%
  1947.   2.  Choose Copy from the Edit menu (or press CTRL+INS).%@NL@%
  1948. %@NL@%
  1949.   3.  Move the mouse cursor to the location where you want to insert the
  1950.       text, and click once. Then choose Paste from the Edit menu. The text
  1951.       from the help window is inserted at the current cursor position.%@NL@%
  1952. %@NL@%
  1953. %@NL@%
  1954. %@NL@%
  1955. %@4@%%@AB@%Closing the Help Window%@AE@%%@EH@%%@NL@%
  1956. %@NL@%
  1957. Once you're through working with the online reference system, close the
  1958. active help window and return to the source window:  %@NL@%
  1959. %@NL@%
  1960. Press ESC.  %@NL@%
  1961. %@NL@%
  1962. Click the Close button in the upper left corner of the window with the Left
  1963. mouse button.  %@NL@%
  1964. %@NL@%
  1965. %@NL@%
  1966. %@4@%%@AB@%Using Help Dialog Boxes%@AE@%%@EH@%%@NL@%
  1967. %@NL@%
  1968. Help dialog boxes contain information about menu commands and their dialog
  1969. boxes. A help dialog box differs from a help window in that it is displayed
  1970. over the source window and any other windows that are displayed. Unlike the
  1971. help window, a help dialog box must be closed before you can execute any
  1972. menu commands. The Cancel button in the lower right portion of the dialog
  1973. box closes the help dialog box.  %@NL@%
  1974. %@NL@%
  1975. To view information about any QuickC dialog box, you can  %@NL@%
  1976. %@NL@%
  1977. Press F1.  %@NL@%
  1978. %@NL@%
  1979. Click the Help button in the dialog box with the Left mouse button.  %@NL@%
  1980. %@NL@%
  1981. Either of these commands causes a help dialog box to appear. To close a help
  1982. dialog box,  %@NL@%
  1983. %@NL@%
  1984. Press F1.  %@NL@%
  1985. %@NL@%
  1986. Click the dialog box's Cancel button by using the Left mouse button.  %@NL@%
  1987. %@NL@%
  1988. %@NL@%
  1989. %@3@%%@CR:C6A00040008 @%%@AB@%Accessing Different Types of Information%@AE@%%@EH@%%@NL@%
  1990. %@NL@%
  1991. This section presents some strategies for accessing the different types of
  1992. information available within the online reference system.  %@NL@%
  1993. %@NL@%
  1994. %@NL@%
  1995. %@4@%%@AB@%Keyword Information%@AE@%%@EH@%%@NL@%
  1996. %@NL@%
  1997. To get information about any keyword, operator, symbolic constant, or
  1998. library function, go to the index, select the keyword's first letter, then
  1999. scroll down the list of entries and select the topic hyperlink. If you know
  2000. the exact name of a keyword, it is often quicker to simply type it in the
  2001. source window and press F1 than to locate it through an index.  %@NL@%
  2002. %@NL@%
  2003. Figure 4.4 shows the information screen for the %@AB@%printf%@AE@% function.  %@NL@%
  2004. %@NL@%
  2005. %@AU@%(This figure may be found in the printed book.)%@AE@%%@NL@%
  2006. %@NL@%
  2007. When information about a function is displayed in the help window, two
  2008. additional hyperlink buttons are displayed.  %@NL@%
  2009. %@NL@%
  2010. %@NL@%
  2011.   ■   <Description> provides a detailed explanation of the function. When
  2012.       the information is displayed, the button changes to <Summary>,
  2013.       allowing you to return to the summarized information about the
  2014.       function.%@NL@%
  2015. %@NL@%
  2016.   ■   <Example> displays C source code that provides an example of how the
  2017.       function is used. The code can be pasted into the source window to
  2018.       compile.%@NL@%
  2019. %@NL@%
  2020. %@NL@%
  2021. %@NL@%
  2022. %@4@%%@AB@%Topical Information%@AE@%%@EH@%%@NL@%
  2023. %@NL@%
  2024. The online reference system is useful when you want an overview of the
  2025. available reference topics, or when you only have a general idea of what
  2026. information you need. Start with the global contents screen, then select any
  2027. hyperlinks that appear to relate to the topic. You can traverse the
  2028. hyperlinks until you locate the necessary information.  %@NL@%
  2029. %@NL@%
  2030. %@NL@%
  2031. %@4@%%@AB@%Menu and Dialog-Box Information%@AE@%%@EH@%%@NL@%
  2032. %@NL@%
  2033. You can get information about any menu command or dialog box by pressing F1
  2034. when the menu command is highlighted or the dialog box is displayed. This is
  2035. helpful when you are first learning to use QuickC, and may not be completely
  2036. familiar with all of the features.  %@NL@%
  2037. %@NL@%
  2038. %@NL@%
  2039. %@4@%%@AB@%Error Information%@AE@%%@EH@%%@NL@%
  2040. %@NL@%
  2041. The Microsoft Advisor provides information about compiler and linker error
  2042. messages.  %@NL@%
  2043. %@NL@%
  2044. To find the meaning of an error message using the keyboard,  %@NL@%
  2045. %@NL@%
  2046. %@NL@%
  2047.   1.  Press F6 to move the cursor to the error window%@NL@%
  2048. %@NL@%
  2049.   2.  Position the cursor on the error number%@NL@%
  2050. %@NL@%
  2051.   3.  Press F1%@NL@%
  2052. %@NL@%
  2053. %@NL@%
  2054. Or:  %@NL@%
  2055. %@NL@%
  2056. %@NL@%
  2057.   1.  Position the mouse cursor on the error number%@NL@%
  2058. %@NL@%
  2059.   2.  Click the Right mouse button%@NL@%
  2060. %@NL@%
  2061. %@NL@%
  2062. %@NL@%
  2063. %@NL@%
  2064. %@NL@%
  2065. %@NL@%
  2066. %@NL@%
  2067. %@CR:C6A00050001 @%%@1@%%@AB@%Chapter 5  Where to Go from Here%@AE@%%@EH@%%@NL@%
  2068. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2069. %@NL@%
  2070. You've installed the QuickC Compiler on your system and tried a sample
  2071. editing session. What you do next depends on your level of experience. You
  2072. can experiment, or you can further investigate some of the other books in
  2073. this package.  %@NL@%
  2074. %@NL@%
  2075. %@NL@%
  2076. %@4@%%@AB@%Read README.DOC%@AE@%%@EH@%%@NL@%
  2077. %@NL@%
  2078. The README.DOC file lists all known corrections and additions to the printed
  2079. manuals. Before you continue, please read this file. You can view it from
  2080. within online help or you can use the QuickC editor (type %@AS@% QC README.DOC %@AE@% to
  2081. read the file).  %@NL@%
  2082. %@NL@%
  2083. %@NL@%
  2084. %@4@%%@AB@%For All Programmers%@AE@%%@EH@%%@NL@%
  2085. %@NL@%
  2086. The QuickC environment has been designed with you, the programmer, in mind.
  2087. You'll find writing, compiling, and debugging QuickC programs faster and
  2088. easier than ever. To learn more about the editor, compiler, linker, and
  2089. debugger, you should run the disk-based tutorial on the QuickC distribution
  2090. disk labeled "Learning the Microsoft QuickC Integrated Environment."  %@NL@%
  2091. %@NL@%
  2092. The \QC2\TUTORIAL directory holds the tutorial program, LEARN.COM. The LEARN
  2093. program contains four lessons:  %@NL@%
  2094. %@NL@%
  2095. %@NL@%
  2096.   1.  How to Use This Tutorial%@NL@%
  2097. %@NL@%
  2098.   2.  Getting Around in QuickC%@NL@%
  2099. %@NL@%
  2100.   3.  Creating Programs in QuickC%@NL@%
  2101. %@NL@%
  2102.   4.  Debugging in QuickC%@NL@%
  2103. %@NL@%
  2104. %@NL@%
  2105. You can run LEARN from the command line or choose the Learn QuickC command
  2106. from the Utility menu.  %@NL@%
  2107. %@NL@%
  2108. QuickC searches the current path and runs the first LEARN.COM program it
  2109. finds. If it finds a LEARN.COM for another program, such as Microsoft Word,
  2110. QuickC will run that LEARN program instead of the one for QuickC.  %@NL@%
  2111. %@NL@%
  2112. If this happens while you are working from the command line, either switch
  2113. to the \QC2\TUTORIAL directory and type %@AS@%LEARN%@AE@%, and press ENTER, or run the
  2114. NEW-VARS batch file.  %@NL@%
  2115. %@NL@%
  2116. ────────────────────────────────────────────────────────────────────────────%@NL@%
  2117. NOTE
  2118.  
  2119. %@AI@%Since most of the changes to QuickC 2.5 are language additions that don't
  2120. %@AI@%affect the QuickC environment or the operation of the compiler or linker,
  2121. %@AI@%the LEARN tutorial program has not been updated to include changes found in
  2122. %@AI@%version 2.5.%@AE@%%@NL@%
  2123. ────────────────────────────────────────────────────────────────────────────%@NL@%%@NL@%
  2124. %@NL@%
  2125. %@NL@%
  2126. %@4@%%@AB@%For Programmers New to the C Language%@AE@%%@EH@%%@NL@%
  2127. %@NL@%
  2128. The book %@AI@%C for Yourself%@AE@% was written for people who already know how to
  2129. program (in BASIC, Pascal, or some other language) but have never used C.
  2130. Part 1, "Learning C," covers everything from functions to flow control and
  2131. from data types to pointers. If you've never programmed in C or if you need
  2132. a refresher course, start with %@AI@%C for Yourself%@AE@%.  %@NL@%
  2133. %@NL@%
  2134. The introduction in %@AI@%C for Yourself%@AE@% lists several additional books that
  2135. newcomers to C may find helpful.  %@NL@%
  2136. %@NL@%
  2137. Another good source of information about how C works is the online help
  2138. system. Prototypes, explanations, and examples for any function are
  2139. immediately available at the press of a key. You may ask for help about a
  2140. specific topic or browse through the contents screen.  %@NL@%
  2141. %@NL@%
  2142. %@NL@%
  2143. %@4@%%@AB@%For C Programmers New to QuickC%@AE@%%@EH@%%@NL@%
  2144. %@NL@%
  2145. Appendix A of %@AI@%C for Yourself%@AE@%  is a quick reference to the QuickC
  2146. implementation of C. Both the proposed ANSI standard and the original
  2147. Kernighan & Ritchie standard are supported.  %@NL@%
  2148. %@NL@%
  2149. Appendix B of %@AI@%C for Yourself%@AE@% summarizes the most useful QuickC library
  2150. functions, listing the header files to include, values to pass, and values
  2151. returned.  %@NL@%
  2152. %@NL@%
  2153. For specific details on the compiling, linking, library, and other support
  2154. programs, see %@AI@%Microsoft QuickC Tool Kit%@AE@%.  %@NL@%
  2155. %@NL@%
  2156. %@NL@%
  2157. %@4@%%@AB@%For QuickC Programmers New to Version 2.5%@AE@%%@EH@%%@NL@%
  2158. %@NL@%
  2159. If you've used an older version of QuickC, you should read Appendix B of
  2160. this book. It lists features that were added to both QuickC version 2.0 and
  2161. the current 2.5 version.  %@NL@%
  2162. %@NL@%
  2163. Advanced C topics and features unique to QuickC are covered in %@AI@%C for
  2164. %@AI@%Yourself%@AE@%. Part 2, "Using C," includes detailed information about the new
  2165. functions such as real coordinate graphics, presentation graphics, fonts,
  2166. and in-line assembly. If you've previously used version 1.0 of QuickC, we
  2167. recommend that you read through Part 2 of %@AI@%C for Yourself%@AE@%. In addition,
  2168. Appendix B, "C Library Guide," summarizes commonly used functions in the
  2169. QuickC run-time library.  %@NL@%
  2170. %@NL@%
  2171. %@NL@%
  2172. %@4@%%@AB@%Additional Tools%@AE@%%@EH@%%@NL@%
  2173. %@NL@%
  2174. QuickC offers more than just an integrated editor, compiler, and linker.
  2175. Additional utilities include the QCL program (for compiling from the DOS
  2176. command line), the LINK program (for linking object modules), the NMAKE
  2177. program (for automating the compile/link process and maintaining programs),
  2178. and the LIB program (for creating your own libraries).  %@NL@%
  2179. %@NL@%
  2180. %@AI@%Microsoft QuickC Tool Kit%@AE@% explains how to use these advanced tools to best
  2181. advantage. Part 1, "Tool Kit Tutorial," is a tutorial that explains
  2182. step-by-step how these programs work. Part 2, "Reference to QuickC Tools,"
  2183. is a complete and exhaustive reference guide that summarizes the many
  2184. options.  %@NL@%
  2185. %@NL@%
  2186. %@NL@%
  2187. %@NL@%
  2188. %@NL@%
  2189. %@NL@%
  2190. %@NL@%
  2191. %@CR:C6A-A0001   @%%@1@%%@AB@%Appendix A  Editor Functions%@AE@%%@EH@%%@NL@%
  2192. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2193. %@NL@%
  2194. This appendix has two parts. The first part, Table A.1, lists the keystrokes
  2195. that invoke commands within the QuickC Compiler Editor and three other
  2196. editors. The second part, Table A.2, lists the editor functions
  2197. alphabetically and defines them.  %@NL@%
  2198. %@NL@%
  2199. Each editor has its own .KEY file. Chapter 3, "Using QuickC," explains how
  2200. to use the /k: option to load one of the four .KEY files supplied with
  2201. QuickC. It also contains directions for using MKKEY.EXE to customize the
  2202. commands within a .KEY file. Functions are not assigned default values. If
  2203. you omit Backspace from your customized .KEY file, you will be unable to
  2204. backspace.  %@NL@%
  2205. %@NL@%
  2206. Note that in Table A.1 below, the plus sign indicates that both keys should
  2207. be held down. For example, CTRL+H means that you hold down the CTRL key
  2208. while you press H. When keys are pressed separately, they are separated with
  2209. a comma. For example, ESC, D means that you press (and release) ESC and then
  2210. press the D key.  %@NL@%
  2211. %@NL@%
  2212. The CAPS LOCK key affects individual keystrokes, but not CTRL or ALT
  2213. sequences. Holding down the SHIFT key defines a block of text.  %@NL@%
  2214. %@NL@%
  2215. %@AB@%Table   %@AB@%A.1 Editor Keystrokes%@AE@%%@AE@%
  2216.  
  2217. %@TH:  18   790 02 11 19 14 11 21 @%Function   QuickC             Microsoft     BRIEF(R)   Epsilon%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%Backspace  CTRL+H             CTRL+H        CTRL+H     ─BegLine    CTRL+Q, CTRL+S     ─             ─          ─           CTRL+Q, S                                   BegPgm     CTRL+HOME          ALT+A, PGUP   CTRL+PGUP  CTRL+HOME           CTRL+Q, CTRL+R                              ESC, <           CTRL+Q, R                                   Cancel     ESC                ESC           ESC        F12Cancel2    F12                F12           F12        ESCChange     CTRL+Q, CTRL+A     CTRL+L        ALT+T      ESC, %           CTRL+Q, A          CTRL+\                   %@TE:  18   790 02 11 19 14 11 21 @%
  2218.  
  2219. %@AB@%Table   %@AB@%A.1 (continued)%@AE@%%@AE@%
  2220.  
  2221. %@TH:  42  1951 02 18 18 15 11 15 @%Function          QuickC            Microsoft      BRIEF(R)   Epsilon%@AB@%─────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%CharLeft          CTRL+S            CTRL+S         LEFT       CTRL+B                  LEFT                                        LEFTCharRight         CTRL+D            CTRL+D         RIGHT      CTRL+F                  RIGHT                                       RIGHTDel               DEL               DEL            DEL        DEL                  CTRL+G            CTRL+G                    CTRL+DDelWord           CTRL+T                                      ALT+D                                                              ESC, DDoEsc             ESC               ─              ─          ─DoQuoteCharacter  CTRL+P            CTRL+P         ALT+Q      CTRL+QDoTab             TAB               TAB            TAB        TAB                  ALT+TAB                                     ALT+TABEndLine           END               END            END        END                  CTRL+Q, CTRL+D                              CTRL+E                  CTRL+Q, D                                   EndPgm            CTRL+END          ALT+A, PGDN    CTRL+PGDN  CTRL+END                  CTRL+Q, CTRL+C                              ESC, >                  CTRL+Q, C                                   EndScn            CTRL+Q, CTRL+X    ALT+A, DOWN    CTRL+DOWN  ─                  CTRL+Q, X                                   EraseEol          CTRL+Q, CTRL+Y    ALT+A, CTRL+Y  ALT+K      CTRL+K                  CTRL+Q, Y                                   Find              CTRL+Q, CTRL+F    ─              ALT+S      CTRL+S                  CTRL+Q, F                                   GotoBookmark0     CTRL+Q, 0         ─              ─          ─GotoBookmark1     CTRL+Q, 1         ─              ─          ─%@TE:  42  1951 02 18 18 15 11 15 @%
  2222.  
  2223. %@AB@%Table   %@AB@%A.1 (continued)%@AE@%%@AE@%
  2224.  
  2225. %@TH:  48  1897 02 16 16 12 11 21 @%Function        QuickC          Microsoft   BRIEF(R)   Epsilon%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%GotoBookmark2   CTRL+Q, 2       ─           ─          ─GotoBookmark3   CTRL+Q, 3       ─           ─          ─HomeLine        HOME            HOME        HOME       HOME                                                       CTRL+AHomeScn         CTRL+Q, CTRL+E  ALT+A, UP   CTRL+HOME  ─                CTRL+Q, E                              KillLine        CTRL+Y          CTRL+Y      ALT+D      ─LineDown        DOWN            DOWN        DOWN       DOWN                CTRL+X          CTRL+X                 CTRL+NLineUp          UP              UP          UP         UP                CTRL+E          CTRL+E                 CTRL+PMatchBrace      CTRL+]          ─           ─          CTRL+]Menu            ALT             F11         ALT        ALTMenu2           F11             ALT+M       F11        F11NewLine         CTRL+M          CTRL+M      CTRL+M     CTRL+MNextLine        CTRL+J          ─           ─          CTRL+JPageDown        PGDN            PGDN        PGDN       PGDN                CTRL+C          CTRL+C                 CTRL+VPageLeft        CTRL+PGUP       ─           ─          CTRL+PGUPPageRight       CTRL+PGDN       ─           ─          CTRL+PGDNPageUp          PGUP            PGUP        PGUP       PGUP                CTRL+R          CTRL+R                 ALT+V                                                       ESC, VResetState      CTRL+K, CTRL+U  ─           ─          ─                CTRL+Q, CTRL+U                                         CTRL+U                                 ScrollDown      CTRL+Z,         CTRL+Z      CTRL+D     CTRL+Z CTRL+DOWN                CTRL+DOWN                              %@TE:  48  1897 02 16 16 12 11 21 @%
  2226.  
  2227. %@AB@%Table   %@AB@%A.1 (continued)%@AE@%%@AE@%
  2228.  
  2229. %@TH:  34  1680 02 18 18 18 12 21 @%Function          QuickC            Microsoft         BRIEF(R)    Epsilon%@AB@%───────────────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%ScrollUp          CTRL+UP           CTRL+W            CTRL+U      CTRL+UP                  CTRL+W                                          ESC, Z                                                                  F4SearchNext        CTRL+L            ─                 ─           ─SetBookMark0      CTRL+K, 0         ─                 ALT+M       ─SetBookMark1      CTRL+K, 1         ─                 ─           ─SetBookMark2      CTRL+K, 2         ─                 ─           ─SetBookMark3      CTRL+K, 3         ─                 ─           ─SplitLine         CTRL+N            CTRL+N            ─           CTRL+OToggleInsertMode  INS               INS               ALT+I       INS                  CTRL+V            CTRL+V                        Undo              CTRL+Q, CTRL+L    ALT+H             ALT+U       ─                  CTRL+Q, L                                       WordLeft          CTRL+LEFT         CTRL+LEFT         CTRL+LEFT   CTRL+LEFT                  CTRL+A            CTRL+A                        ALT+B                                                                  ESC, BWordRight         CTRL+RIGHT        CTRL+RIGHT        CTRL+RIGHT  CTRL +RIGHT                  CTRL+F            CTRL+F                        ALT+F                                                                  ESC, F%@AB@%───────────────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@TE:  34  1680 02 18 18 18 12 21 @%
  2230.  
  2231. %@AB@%Table   %@AB@%A.2 Function Definitions%@AE@%%@AE@%
  2232.  
  2233. %@TH:  72  3271 02 34 42 @%Function                          Description%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%Backspace                         Moves the cursor left and erases the                                   character in that position.Beep                              Causes the computer to beep, usually                                   when an unassigned key is pressed.BegLine                           Moves the cursor to the beginning of the                                  line (column 1), ignoring any                                   indentation.BegPgm                            Moves the cursor to the beginning of the                                  program (line 1, column 1).Cancel                            Closes help windows and cancels dialog                                   boxes.Cancel2                           Cancels dialog boxes.Change                            Searches for selected text and changes                                   it to something else.CharLeft                          Moves the cursor one character left.CharRight                         Moves the cursor one character right.Del                               Deletes the character under the cursor.DelWord                           Deletes the word from the current cursor                                  position to the next white-space                                   character.DoEsc                             Cancels the current selected text.DoQuoteCharacter                  Inserts the next typed character into                                   the text (except carriage returns,                                   linefeeds, and nulls). This allows you                                   to insert characters such as CTRL+C.DoTab                             Indents the entire defined block by one                                   tab setting. A shifted DoTab removes the                                  tabs from a block.Endline                           Moves the cursor to the last nonspace                                   character in the current line.EndPgm                            Moves the cursor to column 1 of the last                                  line in the current file.EndScn                            Moves the cursor to the bottom line of                                   the current screen. The current column                                   is                                   maintained.EraseEol                          Erases all characters from the cursor                                   position to the end of the line. The                                   characters are placed in the insert                                   buffer.Find                              Searches from the current cursor                                   position to the end of the file for                                   defined text.GotoBookmark0                     Moves the cursor to bookmark 0.GotoBookmark1                     Moves the cursor to bookmark 1.GotoBookmark2                     Moves the cursor to bookmark 2.GotoBookmark3                     Moves the cursor to bookmark 3.%@TE:  72  3271 02 34 42 @%
  2234.  
  2235. %@AB@%Table   %@AB@%A.2 (continued)%@AE@%%@AE@%
  2236.  
  2237. %@TH:  65  2824 02 34 42 @%Function                          Description%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%HomeLine                          Moves the cursor to the first nonspace                                   character on the line.HomeScn                           Moves the cursor to line 1 of the                                   current screen, maintaining the current                                   column                                   position.IgnoreChar                        Does nothing. In addition, the editor                                   doesn't beep as it would for undefined                                   keys.KillLine                          Erases everything on the current line                                   and places the line in the insert buffer.LineDown                          Moves the cursor to the next line.LineUp                            Moves the cursor to the previous line.MatchBrace                        Finds matching (parentheses), [square                                   brackets], or {curly braces}. The editor                                  searches for opening or closing braces,                                   depending on which type the cursor is                                   resting on.Menu                              Activates the menu bar.Menu2                             Activates the menu bar.NewLine                           Splits the current line into two lines                                   at the cursor position. The new line is                                   automatically indented to match the line                                  above.PageDown                          Moves forward one screen.PageLeft                          Moves left one screen.PageRight                         Moves one screen to the right (each line                                  on a screen may contain up to 255                                   characters).PageUp                            Moves back one screen.ResetState                        Cancels prefix tables.ScrollDown                        Scrolls down one line at a time,                                   maintaining the current cursor position.ScrollUp                          Scrolls the text up one line at a time,                                   maintaining the current cursor position.SearchNext                        Repeats the Find command.SetBookMark0                      Sets bookmark 0. You may later return to                                  this position with GotoBookMark0.SetBookMark1                      Sets bookmark 1.SetBookMark2                      Sets bookmark 2.SetBookMark3                      Sets bookmark 3.%@TE:  65  2824 02 34 42 @%
  2238.  
  2239. %@AB@%Table   %@AB@%A.2 (continued)%@AE@%%@AE@%
  2240.  
  2241. %@TH:  21  1070 02 34 42 @%Function                          Description%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%SplitLine                         Splits a line in two (like NewLine), but                                  leaves the cursor at the end of the                                   first line instead of the beginning of                                   the second.ToggleInsertMode                  Toggles between insert mode and overtype                                  mode.Undo                              Cancels any commands that might have                                   been performed on the current line. Undo                                  works only when the cursor remains on                                   the line being edited.WordLeft                          Moves the cursor to the previous word.WordRight                         Moves the cursor to the next word.%@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%%@TE:  21  1070 02 34 42 @%
  2242.  
  2243. %@NL@%
  2244. %@NL@%
  2245. %@NL@%
  2246. %@NL@%
  2247. %@NL@%
  2248. %@CR:C6A-B0001   @%%@1@%%@AB@%Appendix B  QuickC Differences%@AE@%%@EH@%%@NL@%
  2249. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2250. %@NL@%
  2251. The QuickC Compiler version 2.5 incorporates a variety of new features. If
  2252. you've used version 1.0, you'll find many new features were added to version
  2253. 2.0, in addition to those added in the current 2.5 release.  %@NL@%
  2254. %@NL@%
  2255. This appendix summarizes some of the significant differences between QuickC
  2256. versions 1.0 and 2.0, and offers a comprehensive guide to the changes found
  2257. in version 2.5. For detailed information about a feature, consult the online
  2258. help, %@AI@%C for Yourself%@AE@%, or %@AI@%Microsoft QuickC Tool Kit%@AE@%.  %@NL@%
  2259. %@NL@%
  2260. %@NL@%
  2261. %@2@%%@CR:C6A-B0002   @%%@AB@%QuickC Version 2.0 Additions%@AE@%%@EH@%%@NL@%
  2262. %@NL@%
  2263. Additions to version 2.0 include  %@NL@%
  2264. %@NL@%
  2265. %@NL@%
  2266.   ■   Expanded and improved online help system invoked by pressing F1%@NL@%
  2267. %@NL@%
  2268.   ■   New presentation and real-coordinates graphics functions%@NL@%
  2269. %@NL@%
  2270.   ■   Small, medium, compact, large, and huge memory models%@NL@%
  2271. %@NL@%
  2272.   ■   Support of in-line assembly-language routines%@NL@%
  2273. %@NL@%
  2274.   ■   New Local Variables, Notepad, and Registers windows%@NL@%
  2275. %@NL@%
  2276.   ■   Text cut and paste support%@NL@%
  2277. %@NL@%
  2278.   ■   Command line compiling and linking with QC.EXE and QCL.EXE%@NL@%
  2279. %@NL@%
  2280.   ■   Incremental compilation%@NL@%
  2281. %@NL@%
  2282.   ■   MKKEY utility for customizing editor key commands %@NL@%
  2283. %@NL@%
  2284. %@NL@%
  2285. %@NL@%
  2286. %@2@%%@CR:C6A-B0003   @%%@AB@%QuickC Version 2.5 Additions and Changes%@AE@%%@EH@%%@NL@%
  2287. %@NL@%
  2288. Additions and changes to version 2.5 affect both the QuickC environment and
  2289. the C language implementation. The following sections list those changes.  %@NL@%
  2290. %@NL@%
  2291. %@NL@%
  2292. %@3@%%@CR:C6A-B0004   @%%@AB@%Interface and Environment Changes%@AE@%%@EH@%%@NL@%
  2293. %@NL@%
  2294. This section describes changes to the QuickC user interface and programming
  2295. environment.  %@NL@%
  2296. %@NL@%
  2297. %@NL@%
  2298.   ■   The Go To command in the Search menu moves to a specified line number
  2299.       in the source.%@NL@%
  2300. %@NL@%
  2301.   ■   The Quickwatch command in the Debug menu gives faster access in
  2302.       viewing variables and expressions.%@NL@%
  2303. %@NL@%
  2304.   ■   The Color command in the Options menu allows you to select four
  2305.       different sets of colors and to change the color of items such as
  2306.       menus, borders, and buttons.%@NL@%
  2307. %@NL@%
  2308.   ■   Tabs can now be treated as spaces or actual tab characters.%@NL@%
  2309. %@NL@%
  2310. %@NL@%
  2311. %@NL@%
  2312. %@3@%%@CR:C6A-B0005   @%%@AB@%Language and Compiler Changes%@AE@%%@EH@%%@NL@%
  2313. %@NL@%
  2314. This section describes changes to the QuickC implementation of the C
  2315. language and changes in the compiler's behavior.  %@NL@%
  2316. %@NL@%
  2317. %@NL@%
  2318. %@4@%%@AB@%Memory Models%@AE@%%@EH@%%@NL@%
  2319. %@NL@%
  2320. %@NL@%
  2321.   ■   QuickC 2.5 now supports the tiny memory model, which produces .COM
  2322.       rather than .EXE files. In the tiny memory model, all of your
  2323.       program's code and data must fit in a single 64K segment.
  2324.       Additionally, tiny programs do not support graphics.%@NL@%
  2325. %@NL@%
  2326.   ■   QuickC 2.5 supports custom memory models, such as huge-compact, with
  2327.       the /A compiler option. Refer to %@AI@%Microsoft QuickC Tool Kit%@AE@% for
  2328.       additional information.%@NL@%
  2329. %@NL@%
  2330. %@NL@%
  2331. %@NL@%
  2332. %@4@%%@AB@%Constants%@AE@%%@EH@%%@NL@%
  2333. %@NL@%
  2334. %@NL@%
  2335.   ■   Both %@AB@%long %@AE@%and %@AB@%unsigned long%@AE@% values are allowed in switch expressions
  2336.       and case constants. Previous versions of QuickC allow only %@AB@%char%@AE@% and
  2337.       %@AB@%int%@AE@% values in this context.%@NL@%
  2338. %@NL@%
  2339.   ■   QuickC supports %@AB@%unsigned long%@AE@% decimal constants. It is now possible to
  2340.       initialize %@AB@%unsigned long%@AE@% variables with values larger than %@AB@%MAX_LONG%@AE@%
  2341.       using decimal (rather than hexadecimal or octal) constants.%@NL@%
  2342. %@NL@%
  2343.   ■   The constant %@AB@%NULL %@AE@%is now defined as %@AS@% ((void *)0)%@AE@%. Previous versions of
  2344.       QuickC defined %@AB@%NULL%@AE@% as 0x0000 in small and medium models and
  2345.       0x00000000L in compact and large models.%@NL@%
  2346. %@NL@%
  2347. %@NL@%
  2348. %@NL@%
  2349. %@4@%%@AB@%Keywords%@AE@%%@EH@%%@NL@%
  2350. %@NL@%
  2351. %@NL@%
  2352.   ■   Storage classes or types (or both) are now required on variable
  2353.       declarations. QuickC previously assumed that untyped variables (such
  2354.       as %@AS@% a;%@AE@%) were integers. This declaration now generates a warning.%@NL@%
  2355. %@NL@%
  2356.   ■   The %@AB@%volatile%@AE@% keyword, which was previously implemented only
  2357.       syntactically, is now also implemented semantically.%@NL@%
  2358. %@NL@%
  2359.   ■   To identify implementation-defined keywords as non-ANSI, an underscore
  2360.       has been added. Thus, %@AB@%far%@AE@%, %@AB@%near%@AE@%, %@AB@%huge%@AE@%, %@AB@%cdecl%@AE@%, %@AB@%fortran%@AE@%, %@AB@%interrupt%@AE@%, and
  2361.       %@AB@%pascal%@AE@% have been changed to %@AB@%_far%@AE@%, %@AB@%_near%@AE@%, %@AB@%_huge%@AE@%, %@AB@%_cdecl%@AE@%, %@AB@%_fortran%@AE@%,
  2362.       %@AB@%_interrupt%@AE@%, and %@AB@%_pascal%@AE@%. QuickC still accepts the obsolescent versions
  2363.       of these keywords, unless you use the /Za (disable extensions) option.%@NL@%
  2364. %@NL@%
  2365.   ■   A new pseudo-instruction, %@AB@%_emit%@AE@%, has been added for use with the
  2366.       in-line assembler. It allows you to define a single immediate byte at
  2367.       the current location in the current text segment.%@NL@%
  2368. %@NL@%
  2369.   ■   The %@AB@%const%@AE@% and %@AB@%volatile%@AE@% qualifiers must be placed after the name of the
  2370.       type they qualify. Consult online help for more information about
  2371.       %@AB@%const%@AE@% and %@AB@%volatile%@AE@%.%@NL@%
  2372. %@NL@%
  2373.   ■   The new %@AB@%_fastcall%@AE@% function attribute causes QuickC to pass function
  2374.       arguments in processor registers instead of on the stack. This results
  2375.       in faster functions when a QuickC program is built with Microsoft C
  2376.       version 6.0.%@NL@%
  2377. %@NL@%
  2378. %@NL@%
  2379. %@NL@%
  2380. %@4@%%@AB@%Locale-Specific Information%@AE@%%@EH@%%@NL@%
  2381. %@NL@%
  2382. %@NL@%
  2383.   ■   The LOCALE.H header file is new to version 2.5. It declares functions
  2384.       and structures for describing conventions, such as the currency
  2385.       symbol, that vary from one country to the next.%@NL@%
  2386. %@NL@%
  2387. %@NL@%
  2388. %@NL@%
  2389. %@4@%%@AB@%Based Objects%@AE@%%@EH@%%@NL@%
  2390. %@NL@%
  2391. %@NL@%
  2392.   ■   QuickC 2.5 supports the following new keywords and operators, which
  2393.       are used to declare and manipulate based objects: %@AB@%_based%@AE@%, %@AB@%_segment%@AE@%,
  2394.       %@AB@%_segname%@AE@%, and %@AB@%:>%@AE@% (the based operator). Based object support is
  2395.       included in QuickC 2.5 for the sake of compatibility with Microsoft C
  2396.       version 6.0. Please refer to Chapter 2, "Managing Memory," in the
  2397.       Microsoft C Professional Development System %@AI@%Advanced Programming
  2398. %@AI@%      Techniques%@AE@% guide for further details.%@NL@%
  2399. %@NL@%
  2400. %@NL@%
  2401. %@NL@%
  2402. %@4@%%@AB@%Data Types%@AE@%%@EH@%%@NL@%
  2403. %@NL@%
  2404. %@NL@%
  2405.   ■   QuickC version 2.0 recognizes %@AB@%long double%@AE@% and %@AB@%double%@AE@% as different
  2406.       types, with both types stored in memory as 64-bit quantities.%@NL@%
  2407. %@NL@%
  2408. %@STUB@%      Because the 80%@AI@%x%@AE@%87 family of math coprocessors supports an 80-bit
  2409.       floating-point type, QuickC version 2.5 stores %@AB@%long double%@AE@% variables
  2410.       in the 80%@AI@%x%@AE@%87 10-byte (80-bit) form.%@NL@%
  2411. %@NL@%
  2412. %@STUB@%      Certain library functions have been modified to handle the %@AB@%long double%@AE@%
  2413.       type. The %@AB@%printf%@AE@% and %@AB@%scanf%@AE@% family of functions supports %@AB@%long double%@AE@%
  2414.       values identified by a trailing %@AB@%l%@AE@% in the format specifier. The library
  2415.       contains new versions of the transcendental functions as well as
  2416.       intrinsic forms that accept %@AB@%long double%@AE@% arguments. These are
  2417.       identified by a trailing %@AB@%l%@AE@% in the function name (e.g., %@AB@%cosl%@AE@%).%@NL@%
  2418. %@NL@%
  2419.   ■   Integer promotion rules have changed. Earlier versions of QuickC
  2420.       attempted to preserve an expression's unsigned nature as much as
  2421.       possible. Version 2.5 attempts to preserve the expression's value.%@NL@%
  2422. %@NL@%
  2423. %@STUB@%      In version 2.0, an %@AB@%unsigned char%@AE@% promotes to an %@AB@%unsigned int%@AE@%; an
  2424.       %@AB@%unsigned int%@AE@% promotes to an %@AB@%unsigned long%@AE@%.%@NL@%
  2425. %@NL@%
  2426. %@STUB@%      In version 2.5, an %@AB@%unsigned char%@AE@% promotes to a %@AB@%signed int%@AE@%; an %@AB@%unsigned
  2427. %@AB@%      int%@AE@% promotes to a %@AB@%signed long%@AE@%.%@NL@%
  2428. %@NL@%
  2429.   ■   Shift operators now give a result that is of the same type as the left
  2430.       operand. QuickC previously yielded a result that was of the same type
  2431.       as the largest of the two values.%@NL@%
  2432. %@NL@%
  2433. %@NL@%
  2434. %@NL@%
  2435. %@4@%%@AB@%Preprocessor%@AE@%%@EH@%%@NL@%
  2436. %@NL@%
  2437. %@NL@%
  2438.   ■   QuickC 2.5 allows longer macro expansions (up to 12K). In low memory
  2439.       conditions, the macro expansion space may be limited to 6K.%@NL@%
  2440. %@NL@%
  2441.   ■   The %@AB@%data_seg%@AE@% pragma has been deleted.%@NL@%
  2442. %@NL@%
  2443.   ■   Version 2.0 of QuickC treated conditional compilation expressions as
  2444.       %@AB@%signed long%@AE@% values. Version 2.5 evaluates these expressions using the
  2445.       same rules as are used for all other expressions in C.%@NL@%
  2446. %@NL@%
  2447. %@NL@%
  2448. %@NL@%
  2449. %@4@%%@AB@%Structures, Unions, Arrays, and Bit Fields%@AE@%%@EH@%%@NL@%
  2450. %@NL@%
  2451. %@NL@%
  2452.   ■   If a structure or union is nested inside another structure or union,
  2453.       you can declare it without using a variable name. This rule simplifies
  2454.       references to inner members of such nested constructs.%@NL@%
  2455. %@NL@%
  2456.   ■   QuickC now allows an unsized or zero-sized array as the last member of
  2457.       a structure. Unsized arrays can appear only as the last member of a
  2458.       structure. Structures containing unsized array declarations can be
  2459.       nested within other structures as long as no element of the enclosing
  2460.       structure follows the unsized array. Arrays of such structures are not
  2461.       allowed.%@NL@%
  2462. %@NL@%
  2463.   ■   QuickC now allows longer string literals (up to 2K).%@NL@%
  2464. %@NL@%
  2465.   ■   You may declare %@AB@%signed%@AE@% as well as %@AB@%unsigned%@AE@% bit fields.%@NL@%
  2466. %@NL@%
  2467.   ■   Bit fields are permitted in unions.%@NL@%
  2468. %@NL@%
  2469. %@NL@%
  2470. %@NL@%
  2471. %@4@%%@AB@%Memory Management%@AE@%%@EH@%%@NL@%
  2472. %@NL@%
  2473. %@NL@%
  2474.   ■   The memory-management routine %@AB@%sbrk%@AE@% has been deleted.%@NL@%
  2475. %@NL@%
  2476.   ■   The %@AB@%_fmalloc %@AE@%function attempts to allocate far memory. In previous
  2477.       versions of QuickC, %@AB@%_fmalloc%@AE@% called %@AB@%_nmalloc %@AE@%if far memory was not
  2478.       available. Now it returns a null pointer if far memory isn't
  2479.       available, even if near memory is available.%@NL@%
  2480. %@NL@%
  2481.   ■   Previous versions of QuickC placed the command-line argument strings
  2482.       and environment strings in the near heap. Now they are allocated
  2483.       through %@AB@%malloc%@AE@%. Because %@AB@%malloc%@AE@% maps to %@AB@%_fmalloc%@AE@% in the compact and
  2484.       large memory models, environment strings and command-line argument
  2485.       strings are in far memory in those memory models.%@NL@%
  2486. %@NL@%
  2487. %@NL@%
  2488. %@NL@%
  2489. %@4@%%@AB@%Miscellaneous%@AE@%%@EH@%%@NL@%
  2490. %@NL@%
  2491. %@NL@%
  2492.   ■   QuickC supports a new warning level (4), which provides even more
  2493.       stringent error checking than the warning levels in version 2.0. You
  2494.       can set this warning level from the command line, by supplying the /W4
  2495.       compiler option, or from the QuickC environment, with the Compiler
  2496.       Flags button shown with the Make command in the Options menu. At
  2497.       warning level 4, QuickC generates warnings for nonportable (non-ANSI)
  2498.       constructs and for undefined or implementation-defined constructs.%@NL@%
  2499. %@NL@%
  2500.   ■   The %@AB@%printf%@AE@% and %@AB@%scanf%@AE@% format specifier modifiers %@AB@%N%@AE@%, %@AB@%F%@AE@%, %@AB@%h%@AE@%, and%@AB@% l%@AE@% have
  2501.       changed. Consult online help for additional information.%@NL@%
  2502. %@NL@%
  2503.   ■   In QuickC 2.0, a prototype or definition that returns a %@AB@%float%@AE@% value
  2504.       actually returns a %@AB@%double%@AE@% value. Version 2.5 interprets such a
  2505.       function as returning a %@AB@%float%@AE@% value.%@NL@%
  2506. %@NL@%
  2507.   ■   QuickC version 2.5 does not align a %@AB@%char%@AE@% variable to an even address
  2508.       unless the variable is local. Likewise, a literal constant string is
  2509.       not aligned as in QuickC 2.0.%@NL@%
  2510. %@NL@%
  2511.   ■   To maintain ANSI compatibility and portability between QuickC and
  2512.       other systems, QuickC now supports trigraphs such as  %@AS@%??= %@AE@% equivalent
  2513.       to  %@AS@%#%@AE@%.%@NL@%
  2514. %@NL@%
  2515. %@NL@%
  2516. %@NL@%
  2517. %@NL@%
  2518.