Hi Tomas, I would presume that you are beginning to get close to the reason that one often encapsulates strings into an object. You need to know the display length of something to center it, and that means that you want to know the length of the string. Without an encapsulating object, you need to recalculate the length often. For most applications, this is quite acceptable, but if you are recalculating the length too often, you might consider encapsulating your strings into some sort of a string object.
@Master: what do you think?? (I mean: Alex :) Hey, Tomas, where are you? Are you Czech? My son from Prague is here visiting in Munich this weekend! Cheers! - Rand On Sun, Apr 26, 2009 at 9:06 AM, Tomas Hlavaty <[email protected]> wrote: > Hi Alex, > > there was a bug in the previous code: > >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((<=3D 130 C) # utf >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let? L (cdr (ass= oc C *PsGlyph)) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (prinl ")= ") >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (prin "["= ) > > should be: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((<=3D 130 C) # utf > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let? L (cdr (assoc C *P= sGlyph)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(prinl ") s= how") > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(prin "[") > >> However, centering unicode/non-ascii characters does not work. =C2=A0Any >> ideas how to achieve that? > > That's probably a question for comp.lang.postscript ;-) > > Cheers, > > Tomas > -- > UNSUBSCRIBE: mailto:[email protected]?subject=3dunsubscribe > -- UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe
