summaryrefslogtreecommitdiff
path: root/web/matlabweb/ctest.web
blob: 02dd823186658eb2598c57d4c5bf4f2a0d008c22 (plain)
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
@* The main function.
@f alpha tex
@f beta TeX
@c
int main()
{
  @<declarations@>@;
  
  phi = alpha/beta;
  switch(i){
  case 0: TeX = 3; goto harmful;
  case 1: TeX = 3.1; break;
  case 2: TeX = 3.14; break;
  default:  TeX = 3.14159;
  }
harmful:    ;
}
  

@
@<declarations@>=

  double phi, TeX;
  int i;