mirror of
https://github.com/Gustavo-E-D-Demarchi/dicionario.git
synced 2026-07-27 16:25:46 -03:00
tentando enteder mais não vai
This commit is contained in:
committed by
GitHub
parent
56be04636d
commit
c51d75f5a1
+18
-6
@@ -27,7 +27,8 @@ program pzim;
|
||||
|
||||
procedure adicionar_lista(var lista : Tlista ; chave : string);
|
||||
var
|
||||
aux , aux2 : Tlista;
|
||||
aux , aux_Ant , aux_Prox : Tlista;
|
||||
temp_s : string;
|
||||
begin
|
||||
new(aux);
|
||||
if
|
||||
@@ -36,10 +37,21 @@ program pzim;
|
||||
begin
|
||||
while aux^.prox <> nil do
|
||||
aux := aux^.prox;
|
||||
|
||||
aux^.key := chave ;//
|
||||
|
||||
|
||||
temp_s := aux^.key;
|
||||
|
||||
new (aux_Ant);
|
||||
new (aux_Prox);
|
||||
|
||||
if maior(temp_s , chave)then
|
||||
begin
|
||||
if aux^.ant <> nil then
|
||||
aux_Ant := aux^.ant ;
|
||||
if aux^.prox <> nil then
|
||||
aux_Prox := aux^.prox;
|
||||
|
||||
aux^.key := chave ;//
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -71,4 +83,4 @@ begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user