LoginSignup
1
0

More than 5 years have passed since last update.

xyzzyで連番文字列を出力する

Posted at
dotimes.cl
(dotimes (x 3)
  (format t "~d~%" x)) (Ctrl + j押下)

出力結果:
0
1
2
nil

左側を0詰めで数値出力する場合

alignLeft.cl
(dotimes (x 100)
  (format t "~3,'0d~%" x)) (Ctrl + j押下)

※「~3」で桁数を指定し、「'0」で左側に詰めたい文字を指定する

出力結果:
000
001
002
003
004
nil

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0