🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bit.listserv.script-l
1 messages
1 total messages Started by Hannah Appl. Kaufman Tue, 21 Jul 1992 18:18
Waterloo Script string functions
#9
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads