M
M
Maxim Romashko2017-05-04 20:24:34
Delphi
Maxim Romashko, 2017-05-04 20:24:34

How to work with doubly linked lists in delphi?

In Pascal, I studied all the rules.

type  celltype = record 
    info: reki; 
    next, previous: ^ celltype 
  end; 
  list = ^ celltype; 
  position = ^ celltype;

How can I translate this code into Delfak?
The kursach has begun, I want to qualify for 9-10, so please, kind people, help
me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mercury13, 2017-05-05
@md5inj

In Delphi, the record language is exactly the same.
class language...

type  
  TCell = class
   public
    info: TReki; 
    next, previous: TCell;
  end; 
  TList = TCell;
  TPosition = TCell;

Yes, about naming types. In C we write Cell cell, but in Pascal cell : Cellit is impossible, it is case-insensitive. It is generally accepted that the type begins with T, the pointer with P. Other prefixes are sometimes added (event - Ev, dynamic array - Da), but types without a prefix are bad form.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question