Demo entry 6676931

Stack Ada Contracts


Submitted by anonymous on Dec 01, 2017 at 16:03
Language: Ada. Code size: 323 Bytes.

--  This procedure puts a new value on top of the stack
procedure Push (This  : in out Stack; 
	  	   Value : Content) 
	with Pre  => not Full  (This), 
	     Post => not Empty (This) and Top (This) = Value; 

function Top  (This  : Stack) return Content; 
function Full (This : Stack)  return Boolean;

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).