Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test23
//fpc 3.0.4 {Linear poiners' structure 'from head'} program test23; {pointer to variable} type PtrType=^BaseType ; BaseType=record info:integer; sled:PtrType end ; {pointer type} var q:PtrType;{pointer variable is static (!) variable} function sostav:PtrType ; var p1,p:PtrType;{pointer variable is static (!) variable} i:integer; begin New(p); p^.info:=1; p1:=p ; for i:=2 to 3 do begin New(p^.sled);{generate new linear structure 'from the head' pointer element } p:=p^.sled; p^.info:=i; end ; p^.sled:=Nil; sostav:=p1 ; end ; begin q:=sostav ; while q<>Nil do begin writeln('consequent values of the "info" ',q^.info:2 ); q:=q^.sled; end ; Dispose(q) end.
run
|
edit
|
history
|
help
0
Урок 3 задача 1 повышенная сложность. Задача 1484. Усложнённая.
Why do not work?
test29
Удвоенное число с одинаковыми цифрами
practica 7 ejercicio 1
test02
ProjetInfo
zadacha7
SINHHOANVI
nomer4