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.55 MB
Time: 0.024 c
1:22134
Rosco
2001-12-15 12:54
2002.01.08
And this is already there?


3:21985
Scully
2001-12-06 15:26
2002.01.08
Date + time without seconds in DBGrid


1:22195
Lnix
2001-12-15 20:00
2002.01.08
string


14:22409
Vadim
2001-11-12 13:56
2002.01.08
Or maybe we will not beat each other's hands?


4:22476
kingdom
2001-11-02 19:42
2002.01.08
Help, UpdateResource does not work with BPL files!





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 Spanish 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