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

Down

Download file! Find similar branches


Socol   (2001-12-18 08:54) [0]

Hello! Why when this code writes information to a file, it turns out there is not qqqqqq but some kind of glitch any questions on the dash?
procedure TForm1.Button3Click (Sender: TObject);
var FileHandle: Integer;
S: string;
begin
S: = "qqqqqq";
FileHandle: = FileCreate ("C: \ q.txt");
FileWrite (Filehandle, S, sizeof (S));
FileClose (FileHandle);
end;



MBo   (2001-12-18 09:00) [1]

because string is a pointer, Sizeof = 4. Do, for example, so.
var f: textfile;
s: string;
begin
S: = "qqqqqq";
AssignFile (f, "C: \ q.txt");
Rewrite (f);
Writeln (F, S);
CloseFile (F);




Mick   (2001-12-18 09:29) [2]

FileWrite (FileHandle, S [1], Length (S))



Pages: 1 whole branch

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

Top









Memory: 0.55 MB
Time: 0.022 c
14-22360
RUS
2001-11-07 19:16
2002.01.08
Internet Explorer


3-21969
Kozhanov
2001-11-30 18:31
2002.01.08
OBDC driver options


14-22346
Ivan Shikhalev
2001-11-06 20:30
2002.01.08
Haiku :))


1-22163
Marina
2001-12-20 16:29
2002.01.08
Month names


3-21979
MAXMEM
2001-12-06 13:21
2002.01.08
DBTreeView





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