think pascal

program pro10;
	uses
		sane;
	var
		a, b: integer;
		x, y, z: extended;
		p, q: double;
		r: real;
		s: comp;
		n: numclass;
begin
	x := 120;
	n := classreal(x);
	writeln(x, n);
	writeln('premi return');
	p := 130;
	n := classdouble(p);
	writeln(p, n);
	s := 12;
	n := classcomp(s);
	writeln(s, n);
	x := 100;
	n := classextended(x);
	writeln(x, n);
	x := -5;
	a := signnum(x);
	writeln(x, a);
	a := 65;
	x := nan(a);
	writeln(a, x);
	readln;
end.

program functio4;
(* funzioni simili a instant pascal di apple II*)
begin
	writeln(round(12.6));
	writeln(trunc(12.6));
	writeln(pred(10));
	writeln(pred('E'));
	writeln(pred(TRUE));
	writeln(succ(10));
	writeln(succ('E'));
	writeln(succ(FALSE));
	writeln(ord('A'));
	writeln(chr(65));
	writeln(random);
	writeln(random);
	writeln(random);
	readln;
end.