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.037 c
3-21986
Dreamer
2001-12-06 15:43
2002.01.08
Data Field not permitted on open DataSet


1-22204
Dmitriy (new)
2001-12-13 19:37
2002.01.08
the code does not create more `273 files in win2000


7-22446
paradox
2001-09-25 19:12
2002.01.08
Do not miss! Well, very necessary.


3-21918
SVS
2001-12-04 13:11
2002.01.08
filling in OleContainer from BlobField


1-22007
creepster
2001-12-17 18:09
2002.01.08
screen saver





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