This is an exercise from THE ELEMENTS OF PROGRAMMING STYLE by Kernighan and Plauger. The program supposedly counts characters, words and sentences. A slach signals end of data. The exercise is to replace the arithmetic ifs with logical iffs.
I don't think the program works, arithmetic ifs or...
Well, the operating system is Windows XP. Installer? I guess it's whatever downloads with the program. Actually I don't think there is/was any installer per se. Whatever unzipped it created C:\FPC and put the files in it.
I've been trying to install Free Pascal on my PC. The download seems to have gone OK. There is now a directory called FCP with a subdirectory named 2.2.0. What next? Isn't the program itself supposed to be FCP.EXE? This file does not exist. Do I need to do some more unzipping? There are...
In the last 24 hours I have had TPC crash whenever I use it on my XP machine. I.e., I type TPC myprog and the Command Prompt window immediately disappears.
The problem seems to be connected with certain sources files, i.e., files with .pas as the extension. However, compiling unaffected files...
I want to create an array of records and have it be a typed constant, I've tried the following:
Type
ElementType = record
Noun : String ;
AtomNum : Byte ;
AtomMass : Real
end ;
Const
ATOM_TABLE : Array [0 .. 2] of ElementType =
(...
I'm using the command line compiler of Turbo Pascal 7. I do not have the IDE.
I recall there is a method of running the compiler and having it tell you which line of code has a run-tme error. It is some kind of switch that tells the compiler the address of the error. It's something like...
Thanks for the input Glenn9999. That's exactly what I thought but it appears that we both may be wrong.
Just yesterday I was browsing through Turbo Pascal 7 the Complete Reference by Stephen K. O'Brien when I found this:
Truncate
procedure Truncate(var F);
Forces end of file to be the...
Is there any way to delete a record in a typed file? For example:
type
whatype = file of string ;
var
f : whatype ;
i : longint ;
begin
i := 99 ;
assign (f, 'whatever') ;
reset (f) ;
delete (f,i) ;
close (f)
end.
In the above code delete (var f:whatype ; i:longint)...
Suppose I write a program and sell copies of the .exe file. How can I keep one customer from making a copy of the .exe file and giving it away? (or selling it? I don't want to use a dongle.
I have bought software that required a code to install but I have no idea how to implement such a...
3.4E+38 means 340,000,000,000,000,000,000,000,000,000,000,000,000.0
3.4E-38 means 0.000000000000000000000000000000000000034
In other words 3.4E+38 means 3.4 with the decimal point shifted 38 positions to the right.
3.4E-38 means 3.4 with the decimal point shifted 38 positions to the left.
I have an old PC with Windows 98. The HD is 8.4 Gig with four partitions of 2.1 Gig each. Only the C: partition has anything on it. There are no files on the machine that I want to keep.
I want to make this a DOS 6.22 machine. I had planed to repartition the drive with fdisk, but it occurs...
thread935-969152
First, it would not compile because the variable pocMedz is never declared.
Second, assuming that was fixed, the program simply clears the screen, then waits for the user to hit a key.
The Boolean expression in the IF statement will never evaluate to TRUE ergo the write...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.