Welcome to the CHICKEN Scheme pasting service

foo added by sepisultrum on Sun Jul 24 21:30:58 2011

(define (main)
  (let ((screen (sdl-set-video-mode *screen-width* *screen-height*
                                   0
                                   (+ SDL_HWSURFACE
                                      SDL_HWPALETTE
                                      SDL_DOUBLEBUF)))
        (running #t)
        (event (make-sdl-event))
        (d-main (make <drawable> 'position (v2 (/ *screen-width* 2)
                                               (/ *screen-height* 2))))
        (d-child (make <drawable> 'position (v2 10 0))))
    (set! (children d-main) (cons (children d-main) d-child))
    (display (children d-main))
    (set! (debug d-main) #t)
    (set! (debug d-child) #t)
    
    (let loop ()
      (if (sdl-poll-event! event)
          (cond 
           ((= (sdl-event-type event) SDL_QUIT)
            (set! running #f))))

      (sdl-fill-rect screen #f (make-sdl-color 0 0 0))

      (draw! d-main screen)
      
      (sdl-flip screen)

      (if running (loop)))
    (sdl-quit)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the procedure to access a character in a string by index in R5RS?
Visually impaired? Let me spell it for you (wav file) download WAV