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, задача 10 (1483). Два момента времени
Calculatrice 1.0
bilete
Task1-3
Луноход-4
8
Macintosh HD/Users/aleksej/Downloads/132.docx
zadanye 3 b
Бассейн-8 count
Homework 8