-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell1.c
54 lines (50 loc) · 1.18 KB
/
shell1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//shell program in ROBOTC for Professor Reed's -- OETC Robotic Workshop 2016
//
//Note: this program will NOT run on the EV3
// but is presented here to demonstrate
// practical progam design ONLY!
//
//Available at github.com
//https://github.com/profjrr/Profjrr_OETC_RoboticsWorkshop_2016/blob/master/shell1.c
//
int myval1 = 1; // defined as global
//
//
//subroutines follow: (must be before task main() or int main() in regular c
//
//============================================
//do inputs
//============================================
//
void inputs(int myval1)
{
//printf("inputs routine has started");
}
//
//============================================
//do processing
//============================================
//
void processing(int myval2)
{
//printf("processing routine has started");
}
//
//============================================
//do outputs
//*** start here for designing a new project
//============================================
//
void outputs(int myval3)
{
//printf("outputs routine has started");
}
//
task main()
{
int myval2 = 2; // defined as local to task main()(preferred)
int myval3 = 3;
inputs(myval1);
processing(myval2);
outputs(myval3);
}