🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3476

Re: printf("%8d")

#3476
From: Chuck L. Peterson
Date: Fri, 26 Oct 1990 16:38
13 lines
712 bytes
Only after getting the %8d thing working did I realize that
this is completely not what I want since my goal is
to right-justify numbers.  It turns out that %8d will only
work with a constant-width font.

I fixed my problem by doing right-justification at (x,y) with this:

	number 8 string cvs dup stringwidth pop
	x exch sub y moveto
	show

Chuck L. Peterson
clp@altos.com
Technical Details
Message-ID: <4311@altos86.Altos.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!apple!altos!altos86!clp

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!apple!altos!altos86!clp
From: clp@altos86.Altos.COM (Chuck L. Peterson)
Newsgroups: comp.lang.postscript
Subject: Re: printf("%8d")
Message-ID: <4311@altos86.Altos.COM>
Date: 26 Oct 90 16:38:56 GMT
Organization: Altos Computer Systems, San Jose, CA
Lines: 13