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); 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
practica 11 ejercicio 1
Squad equation
09 ariketa
Tri 1.0
basketball_player_training
Homework 1
test15
Pascal First
test_03
ahoj