Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test26
//fpc 3.0.4 {record with variable part "case" as pointer type overcome data segment limitation} program test26; type fig=(circle,quadra); Pfig=^Figure; Figure=record sled: ^Pfig; case f:fig of circle:(r:real); quadra:(a,b:real) {"a" gets the space of "r"} end; var m,q:Pfig; function square(x:Pfig):real; begin with x^ do case f of circle: square:=3.14*sqr(r); quadra:square:=a*b ; end; end; begin New(m); with m^ do begin f:=circle; r:=10; writeln(r:2:1); writeln(square(m):2:1) ; end; Dispose(m); writeln; New(q); with q^ do begin f:=quadra; r:=2; {a:=1;}{"a" gets the space of "r"} b:= 3; writeln(r:2:1); writeln(b:2:1); writeln(square(q):2:1) ; end; Dispose(q); end.
run
|
edit
|
history
|
help
0
считалочка05
Opdracht_2
practica 9 ejercicio 5
SP2013E1b
Task 3a
dsds
buscar_numero_V2_divisible_5
6
formato_real
две рядом стоящие одинаковые цифры у числа