For Programmers: Free Programming Magazines  


Home > Archive > Scheme > March 2007 > test for mzscheme and mit-scheme









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author test for mzscheme and mit-scheme
mainargv@gmail.com

2007-03-29, 8:15 am

hi

How do I write protable code testing different scheme implementation
like mzscheme and mit-scheme. I've tried to use procedure? but that
won't work and you know why. scheme is too eager. I can't think of a
way "not" to trigger symbol not found type error. How to I catch an
exception and continue the rest of my code?

Jens Axel Søgaard

2007-03-29, 8:15 am

mainargv@gmail.com skrev:
> How do I write protable code testing different scheme implementation
> like mzscheme and mit-scheme.


Do you want to write R5RS code?

Or just code that runs on both MzScheme and MIT-Scheme?

Writing the test code in an R5RS portable fashion can't be done.

An easy way to write code that works in both MzScheme and
MIT-Scheme is to keep two files: mzscheme.scm and mit.scm
in which you put definitions of things that are MzScheme and
MIT-Scheme specific respectively. Then as the first line in
main.scm use (include "mzscheme.scm") or (include "mit.scm").

--
Jens Axel Søgaard
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com