[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Using Fortmat
From: |
William Ramsay |
Subject: |
[Chicken-users] Using Fortmat |
Date: |
Thu, 06 Dec 2007 16:00:42 -0500 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071031) |
Actually, this brings us another question. Is it more efficient
to do something like what you have below than to add an egg? By
efficient, I mean both in speed and program size? I have it my
head that I am better off keeping to the routines in the language
rather than adding an egg. The code below does the one thing I
need. Obviously I use eggs where the task is larger or impossible
without.
Bill
Of course, there's also the poor man's string padding, using srfi-13:
(define (number-pad num len)
(let ((str (number->string num)))
(if (>= (string-length str) len)
str
(string-pad str len #\0))))
Tobia
- [Chicken-users] Using Fortmat,
William Ramsay <=