Organization: NASA Langley Research Center, Hampton, VA USA
Lines: 113
Distribution: world
Message-ID: <1hakebINNdsa@rave.larc.nasa.gov>
NNTP-Posting-Host: lynx.larc.nasa.gov
Greetings,
The following is an example of a functional program in C I wrote after
reading MaClannan's book on FP. I would like to invite comments from the FP
community. I was pleased to find that the Sun C optimizer knows about tail recursion optimization so that this program runs as fast as the conventional
C version that it is based on.
/*
* Hexdmp.c
*
* Author: Mike Goodrich (804) 864-1790 goodrich@128.155.25.38 (goodrich@lynx.larc.nasa.gov)
*
* Purpose to dump a given file to STDOUT in hex and ascii
*
* NOTE: This version was rewritten to adhere to the 'functional program' paradigm
*
* Usage: hexdmp <filename>
*
* Note: If compiling under Microsoft C must use -J to overide signed char