Fixed Point Maths

version 5 by Michael Callaghan

  • Home page
  • Beginning
  • Previous
  • Next



  • Example: * The Classroom - Shows the use of the sine function

        "The Classroom" by Michael Callaghan

        Include Fixed Point Maths by Michael Callaghan.

        The classroom is a room. A chalk board is in the classroom. Understand "chalkboard" as the chalk board.

        Instead of examining the chalk board:
            say "Someone has drawn a curve like a sine wave turned through 90 degrees.";
            repeat with angle running from 0 to 360:
                let val be the sine of angle;
                let val be 40 real times val;
                let plot be val as an integer;
                let plot be 40 plus plot;
                repeat with X running from 1 to plot:
                    say " [run paragraph on]";
                let angle be angle plus 10;
                say "*[line break]".

        Test me with "x chalk board".