🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.script-l
Article #9

Waterloo Script string functions

#9
From: Hannah Appl. Kaufman
Date: Tue, 21 Jul 1992 18:18
16 lines
1012 bytes
I am trying to create a padded string with leading zeros using
Waterloo Script 88.1 functions and am having no luck.  The
simplest would be the &'right function -

.sr num = 11
.sr newnum = &'right(&num,7,'0')

However, this gives me &newnum as 11, left-justified with no zeros.
What I want is 0000011 if the number is 11, and 0000111 if the
number has 3 digits, etc.

I've tried using the &'overlay and &'insert functions with similar
problems.  Anyone know a solution?

Thanks,
Hannah Kaufman
Technical Details
Message-ID: <SCRIPT-L%92072113195787@RICEVM1.RICE.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!psuvax1!psuvm!auvm!PUCC.BITNET!Q2201

Show Full Headers
Complete Article Headers
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!psuvax1!psuvm!auvm!PUCC.BITNET!Q2201
Message-ID: <SCRIPT-L%92072113195787@RICEVM1.RICE.EDU>
Newsgroups: bit.listserv.script-l
Date:         Tue, 21 Jul 1992 14:18:52 EDT
Sender:       "IBM vs Waterloo SCRIPT discussion group"
              <SCRIPT-L@RICEVM1.BITNET>
From:         "Hannah Appl. Kaufman" <Q2201@PUCC.BITNET>
Subject:      Waterloo Script string functions
Lines: 16