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.024 c
4-22474
Slym
2001-11-02 11:25
2002.01.08
Can't make a hook ... Help!


3-21926
Oleon
2001-12-04 15:14
2002.01.08
Создание таблицы из Delphi.


4-22475
Di_wind
2001-11-02 16:08
2002.01.08
Search


4-22482
PONTIY
2001-11-01 10:06
2002.01.08
WinExec or ShellExecute


1-22023
Delphig
2001-12-13 03:13
2002.01.08
I have ? off-topic. Which OS Delphi works best for?





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