🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1807

Is cleartomark good PS programming style?

#1807
From: Rob Bradlee
Date: Mon, 10 Aug 1992 14:37
31 lines
1269 bytes

Here is PostScript coding style question for all you gurus:  Let's say you
have a PS procedure that does some like this

/utility_procedure {
	mark
	%
	% imagine PS code here to do some useful things and load up the stack
	%
	% Now imagine some PS code that does a test based on some of the 
	% stack info to see if it's worth processing the rest of the data
	% on the stack
	{
	% test was true.  Process the rest of the items on the stack.
	}
	{
	% test failed. cleanup.
	cleartomark
	}  ifelse
} def


Is the cleartomark a legitimate way to make sure you've left the stack in good
shape or a cheap trick that absolves you from the effort of thinking?
Your opinions, please.
-- 
Rob Bradlee  w:(508)-658-5600 X5153 
Agfa Corporation.                      ...!{decvax}!cg-atla!bradlee
200 Ballardvale St.                        bradlee@cg-atla.agfa.com
Wilmington, Mass. 01887 
Technical Details
Message-ID: <10077@cg-atla.UUCP>
Path: arc1-ca.pugleaf.net!sparky!uunet!ulowell!swlvx2!cg-atla!bradlee

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ulowell!swlvx2!cg-atla!bradlee
From: bradlee@cg-atla.UUCP (Rob Bradlee)
Newsgroups: comp.lang.postscript
Subject: Is cleartomark good PS programming style?
Keywords: style
Message-ID: <10077@cg-atla.UUCP>
Date: 10 Aug 92 14:37:22 GMT
Distribution: comp
Organization: Agfa Compugraphic Division, Wilmington, Mass. USA
Lines: 31