PChar/ru
Deutsch · English · Español · Français · Русский
PChar является типом данных и указателем на строку с завершающим нулевым символом. Наиболее важным применением PChar является взаимодействие с системными библиотеками, такими как dll.
Пример использования в Messagebox:
var
s: String;
begin
s := 'Test';
Application.MessageBox( PChar(s)),'Title', MB_OK );
end;Объявление:
var
p: PChar;Правильные присваивания:
p := 'Это строка с нулевым завершающим символом.';
p := IntToStr(45);Неправильные присваивания:
p := 45;Как и следовало ожидать, значение типа integer не может быть преобразовано в тип PChar.
См. также
From the Free Pascal wiki, page "PChar/ru", as it stood on 2021-09-03 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
