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]

Здраствуйте! Почему когда данный код записывает информацию в файл то там получается не qqqqqq а какойто глюк всякие вопросики черточки?
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]

потому что string - указатель, Sizeof=4. Делай,например, так.
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.81 MB
Time: 0.033 c
14-22340
Yuraz
2001-11-06 10:09
2002.01.08
People, tell me where the cookies in W2K are stored, and how you can bang them


1-22221
Sour
2001-12-16 21:00
2002.01.08
Resources


14-22327
fliz
2001-11-05 15:39
2002.01.08
and they say the day after tomorrow is a holiday?


14-22407
KL
2001-11-03 00:47
2002.01.08
Beta Testing !!!


6-22295
Maamed
2001-10-10 09:15
2002.01.08
Import From Excell





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