"DADiSP inspired everyone and produced radical shifts in thinking."

- Felix Grant, Scientific Computing World

DADiSP / WAV

Simple Corners

Four walls makes a house, four corners makes a rounded rectangle. That's all there is in this example.

    /* maximum of one or more inputs */
    vmax(argv)
    {
        local i, s;

        /* 0 or 1 arg case */
        if (argc < 2) {
            if (argc < 1) {
                s = max();
            }
            else {
                s = max(getargv(1));
            }
        }
        else {
            /* initialize */
            s = max(getargv(1), getargv(2));

            /* compare input args */
            for (i = 3; i <= argc; i++) {
                s = max(s, getargv(i));
            }
        }
        return(s);
    }