summaryrefslogtreecommitdiffstats
path: root/demo2.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-06 20:38:14 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-06 20:41:05 -0800
commitdce8b7c20eaf1fbf1e7199eb04684a92c217d4d9 (patch)
tree9caaf6a66f89aaeff14b50e4c32a33cdd958018d /demo2.tl
parentf4f39e9d7471df807d8a8e9a8ee12f56e30e10d6 (diff)
downloadgtk-demos-dce8b7c20eaf1fbf1e7199eb04684a92c217d4d9.tar.gz
gtk-demos-dce8b7c20eaf1fbf1e7199eb04684a92c217d4d9.tar.bz2
gtk-demos-dce8b7c20eaf1fbf1e7199eb04684a92c217d4d9.zip
Switch demo2 and demo3 from roman numerals to hex.
Diffstat (limited to 'demo2.tl')
-rwxr-xr-xdemo2.tl4
1 files changed, 3 insertions, 1 deletions
diff --git a/demo2.tl b/demo2.tl
index 25bea85..f45baa6 100755
--- a/demo2.tl
+++ b/demo2.tl
@@ -21,7 +21,9 @@
; Button number (bn) and button number text (bnt):
(defun bn (n) (nth (pred n) '(11 22 33 44 55)))
-(defun bnt (n) (format nil (if (eq numar 'a) "~d" "~x") (bn n)))
+(defun bnt (n)
+ (let ((h-or-d (relate '(dec hex) '("~d" "~x"))))
+ (fmt [h-or-d numar] (bn n))))
(defun togglenumar ()
(upd numar toggle)