Sunday, June 28, 2009

Scheme Goodness

But after several months of fighting in my spare time with getting the eVB up and running on my virtualised XP system, I just gave up and figured that this blog would not really go anywhere interesting.

Until, I chanced upon the fact that PocketScheme has the hooks in it to generate and deal with actual WindowsCE forms.

Of course, it's as ugly as writing windowed apps in C but, hey - it's Scheme for pete's sake. One should be able to abstract much of that ugliness that is windowed apps in C. (*shudder)

Here's a taste of some Scheme goodness in a simple app that adds two to a number you give it:

(begin
(define (x n) (+ 2 n))
(display "enter a number:")
(define mynum (read))
(define res (x mynum))
(display #\newline)
(display "result:")
(display "res)
)

No comments:

Post a Comment