Turbo Pascal Frequently Asked Questions, a monthly pointer

 113827 Feb 5 1997 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip
 tsfaqp.zip Common Turbo Pascal Questions and Timo's answers

This file TSFAQP.IDX lists the contents of

                       also available as

       Common Turbo Pascal Questions and Timo's answers

FAQPAS.TXT Frequently (and not so frequently) asked Turbo Pascal
questions with Timo's answers.
 1) How do I disable or capture the break key in Turbo Pascal?
 2) How do I get a printed documentation of my students' TP runs?
 3) What is the code for the weekday of a given date?
 4) Need a program to format Turbo Pascal source code consistently
 5) Can someone give me advice for writing a tsr program?
 6) Why can't I read / write the com ports?
 7) What are interrupts and how to use them in Turbo Pascal?
 8) Should I upgrade my Turbo Pascal version?
 9) How do I execute an MS-DOS command from within a TP program?
10) How is millisecond timing done?
11) How can I read the text character fonts from the memory?
12) How to find the files in a directory and subdirectories?
13) I need a power function but there is none in Turbo Pascal.
14) How can I create arrays that are larger than 64 kilobytes?
15) How can I test that the printer is ready?
16) How can I clear the keyboard type-ahead buffer?
17) How can I utilize expanded memory (EMS) in my programs?
18) How can I obtain the entire command line?
19) How do I redirect text from printer to file in my TP program?
20) Turbo Pascal is for wimps. Use standard Pascal or C instead?
21) How do I turn the cursor off?
22) How to find all roots of a polynomial?
23) What is all this talk about "Pascal homework on the net"?
24) How can I link graphics drivers directly into my executable?
25) How can I trap a runtime error?
FAQPAS2.TXT More frequently (and not so frequently) asked Turbo
Pascal questions with Timo's answers.
26) How to get ansi control codes working in Turbo Pascal writes?
27) How to evaluate a function given as a string to the program?
28) How does one detect whether input (or output) is redirected?
29) How does one set the 43/50 line text mode?
30) How can I assign a value to an environment variable in TP?
31) How does one store, and then restore the original screen?
32) How can I convert a TPU unit of one TP version to another?
33) Which error is e.g. Runtime error 205, etc
34) Why can't I open read-only files? I get "File access denied".
35) How do I obtain high and low parts of a byte variable?
36) How can I set a hi-intensity color background in the text mode?
37) Where can I find a program to convert (Turbo) Pascal to C?
38) How can I read input without echoing to the screen?
39) How can I edit the readln input stream?
40) How can I write (brand) something into my executables?
41) What is wrong with my program? It hangs without a clear pattern?
42) How do I convert a decimal word into a hexadecimal string, etc?
43) How to determine the last drive?
44) How can I put a running clock into my Turbo Pascal program?
45) How to establish if a name refers to a directory or not?
46) How does one disable alt-ctrl-del?
47) How can I test whether a file exists?
48) What is the name of the current Turbo Pascal program?
49) How is the code for rebooting the PC written in Turbo Pascal?
50) How can I write inline code?
FAQPAS3.TXT The third set of frequently (and not so frequently)
asked Turbo Pascal questions with Timo's answers.
51) I am running out of memory when compiling my large program.
52) How do I avoid scrolling in the last column of the last row?
53) How can one hide (or unhide) a directory using a TP program?
54) How do I test whether a file is already open in a TP program?
55) How can I test and convert a numerical string into a real?
56) How can I reverse a TP .EXE or .TPU back into source code?
57) How can I calculate the difference between two points of time?
58) Is a program running stand-alone or from within the IDE?
59) Please explain Turbo Pascal memory addressing to me.
60) How do I obtain a bit or bits from a byte, a word or a longint?
61) What are Binary Coded Decimals? How to convert them?
62) How can I copy a file in a Turbo Pascal program?
63) How can I use C code in my Turbo Pascal program?
64) How do I get started with the Turbo Profiler?
65) How can I detect if the shift/ctrl/alt etc key is pressed?
66) How do I get a base 10 logarithm in TP?
67) If Delay procedure does not work properly, how do I fix it?
68) How much memory will my TP program require?
69) How to detect if a drive is a CD-ROM drive?
70) How do I convert an array of characters into a string?
71) How do I get started with graphics programming?
72) Where to I find the different sorting source codes?
73) A beginner's how to write and compile units.
74) What are and how do I use pointers?
75) How can I read another program's errorlevel value in TP?
FAQPAS4.TXT The fourth set of frequently (and not so frequently)
asked Turbo Pascal questions with Timo's answers.
76) What are the current Pascal newsgroups on the Usenet news?
77) How do I detect the CapsLock status, how do I turn it on/off?
78) How do I detect if the F11 or F12 key has been pressed?
79) How do I extract (parse) substrings from an input string?
80) How do I find out the size of any kind of a file?
81) How do I format graphics output like in textmode writeln?
82) How do I detect if more than one standard key is pressed down?
83) How can I read a disk's Volume Serial Number?
84) How can I disable and then enable the keyboard in my TP program?
85) How do I get the character device name of the (first) CD-ROM?
86) How do I eject a CD-ROM using a Turbo Pascal program?
87) How do I find out if the ANSI.SYS driver has been loaded?
88) Where do I find Turbo Pascal tutorials and/or good textbooks?
89) How do I make an executable of my Turbo Pascal source program?
90) How can I quickly read the last byte of a file?
91) Is 2000 a leap year? What is the leap year algorithm?
92) Does anybody have a program that gives the week number?
93) How can I use OutText to write numbers in the graphics mode?
94) How can I redirect output to file if I use the Crt unit?
95) How to write a function to return true if I am in graphics mode?
96) My graph.tpu got corrupted. Someone please email me a new copy.
97) How can I avoid run-time errors in numeric input using readln?
98) How can I limit the user's readln input to e.g. 3 characters?
99) Can you tell a beginner how to delete files with Turbo Pascal?
100) Could you please explain shl and shr operators to a beginner?
FAQPAS5.TXT The fifth set of frequently (and not so frequently)
asked Turbo Pascal questions with Timo's answers.
101) How do I detect if mouse hardware/driver is installed?
102) How can I read absolute sectors directly from a floppy?
103) How can I move a file to another directory in Turbo Pascal?
104) How can I get/set a disk volume label?
105) Is there a function to chop off the leading zero from 0.322?
106) How can I print a text file (and conclude sending a formfeed)?
107) How can I round 4.1256455 to two decimal places to give 4.13?
108) How can I list with paths all the files on a drive?
109) What are the formulas for ArcSin and ArcCos?
110) How can I determine how many bytes are allocated to a file?
111) How can I modify the colors of the VGA graphics palette?
112) How can I check if SMARTDRV has been installed? Which version?
FAQPASB.TXT Bibliography of textbooks and references for frequently
asked Turbo Pascal questions with Timo's answers.

Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi archives
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi  <URL:http://uwasa.fi/~ts>  ; FIN-65101,  Finland