Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Files and access Find similar branches


Kreo   (2001-12-20 21:16) [0]

Question WIZARDS. I bought the book "Programming on Object Pascal in Delphi 5"
A diskette with examples of programs is sold with the book. Checked - the contents of the floppy matches the listings from the book. QUESTION - why the following code (from an example) is not compiled?

// ----------
type
person = record
f_name: string [20];
l_name: string [20];
address: string [50];
age: byte;
end;

was
f: file of person;

impementation

// skipped

procedure TForm1.Button1Click (Sender: TObject);
begin
AssignFile (f, "c: \ sample.db");
{$ I-}
Append (f);
{$ I +}
if IOResult = 0 then
// skipped

// ---------

So, on the line Append (f); the compiler swears - they say types are not
match. Although if you use the command Reset (f) or Rewrite {f}
Neither speaks a word and everything works. Why



PVR   (2001-12-20 22:58) [1]

The Append command with text files only works. You need the SEEK and Write commands.



SergVlad   (2001-12-20 23:05) [2]

Append (..) for text files only
f: TextFile;



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.81 MB
Time: 0.037 c
1-22177
Cutting
2001-12-21 09:38
2002.01.08
Why do not work bryaki in


3-21903
Victor Tsay
2001-11-29 10:02
2002.01.08
Replication


4-22506
gluka
2001-11-06 00:16
2002.01.08
How to cram a * .dll file in an exe file?


1-22184
Alligator
2001-12-21 09:44
2002.01.08
maybe who knows?


6-22298
karafuto
2001-10-11 14:00
2002.01.08
Why do you need TIdAntiFreeze (InDy)?





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish