How The Tutorial Program Works - Renesas CE2000-H8S Series User Manual

Compact emulator
Table of Contents

Advertisement

www.DataSheet4U.com
7.3

How the Tutorial Program Works

The first part of the program includes a series of header files:
#include "machine.h"
#include "string.h"
The program then gives prototypes for the constants, structures, and function initial values:
#define NAME
#define AGE
#define ID
#define LENGTH 8
struct namelist {
char
short age;
long
};
struct namelist section1[] = {
"Naoko", 17, 1234,
"Midori", 22, 8888,
"Rie",
"Eri",
"Kyoko", 26, 3333,
"",
};
int count;
void sort();
Now the main program.
main( )
{
count = 0;
for ( ; ; ){
}
}
(short)0
(short)1
(short)2
name[LENGTH];
idcode;
19, 7777,
20, 9999,
0,
0
sort(section1, NAME);
count++;
sort(section1, AGE);
count++;
sort(section1, ID);
count++;
47

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ce2000-h8s/2238

Table of Contents