Updates to the Ruamoko manual, still very much in progress.

This commit is contained in:
Jeff Teunissen 2003-02-18 20:08:05 +00:00
parent 03505e80d1
commit 5b79b7512a
5 changed files with 1341 additions and 194 deletions

8
tools/qfcc/doc/hello.r Normal file
View file

@ -0,0 +1,8 @@
#include <qwaq/globals.rh>
#include <qwaq/fields.rh>
#include <qwaq/builtins.rh>
void () main =
{
printf ("Hello, world!\n");
};

10
tools/qfcc/doc/hello2.r Normal file
View file

@ -0,0 +1,10 @@
#include <qwaq/globals.rh>
#include <qwaq/fields.rh>
#include <qwaq/builtins.rh>
void () main =
{
printf ("Hello, ");
printf ("world!");
printf ("\n");
};

View file

@ -0,0 +1,10 @@
208 strofs
4 statements
14 functions
30 globaldefs
0 locals size ((null))
8 fielddefs
52 pr_globals
6 entityfields
1316 TOTAL SIZE
Compilation time: 0.0365 seconds.

File diff suppressed because it is too large Load diff

23
tools/qfcc/doc/radians.r Normal file
View file

@ -0,0 +1,23 @@
#include <qwaq/globals.rh>
#include <qwaq/fields.rh>
#include <qwaq/builtins.rh>
#define PI 3.14159265358973
/* Print a silly conversion table between degrees and radians */
void () main =
{
float degrees, radians;
integer lower, upper, step;
lower = 0; // lower limit
upper = 360; // upper limit
step = 45; // step size
degrees = lower;
while (degrees <= upper) {
radians = degrees * (PI / 180);
printf ("%f\t%f\n", degrees, radians);
degrees = degrees + step;
}
};