Throw please food for thought about pointers in DELPHI! No, I certainly read the mat part and worked with them (not fully understanding their nature), but why?
type TMyRec = class s:string; n:integer; end; var MyRec: TMyRec; PRec: ^TMyRec; begin //Но MyRec сейчас null на какую область памяти может начать ссылаться PRec? PRec:=@MyRec; PRec^.S:='Строка данных';//С помощью указателя производится изменение строкового поля записи PRec^.N:=256;//С помощью указателя производится изменение числового поля записи end; Everything is super, everything is great and works. But why, if the next record also works great?
var MyRec: TMyRec; begin MyRec:=TMyRec.Create; MyRec.S:='Строка данных'; MyRec.N:=256; end; In general, I have a lot of questions on pointers that I can’t even articulate. I would be grateful for any information explaining why we need pointers in everyday life.
MyRec:=TMyRec.Create;I also do not know how much memory will need nevertheless allocated it! - JVic