File: vpointer-tst.nco

package info (click to toggle)
nco 5.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 38,260 kB
  • sloc: ansic: 84,963; cpp: 28,654; sh: 14,071; perl: 5,996; makefile: 2,009; lex: 1,009; python: 127; csh: 40
file content (34 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (7)
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
@all=get_vars_in();

*sz=@all.size();

nbr_err=0;

for(*idx=0;idx<sz;idx++)
{
  @var_nm=@all(idx);
  // print(@var_nm,"about to test %s\n");
  if(*@var_nm.type() == NC_INT || *@var_nm.type() == NC_FLOAT)
  {
       *@var_nm=*@var_nm.double();
       push(&@tst,@var_nm); 
  }

} 


sz=@tst.size();
/* now check the number of conversions */
for(*idx=0;idx<sz;idx++)
{
  @var_nm=@tst(idx);
  
  if(!exists(*@var_nm)) 
  {
   print(@var_nm,"var: %s not present in output\n"); 
   nbr_err++;
  }
}

print("total number of errors ");
print(nbr_err);