mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-27 08:49:16 +08:00
7e582ad3f2
The code for handling character constants in datalists in ncgen has some problems. 1. It failed on large constants 2. It did not handle e.g. var = 'a', 'b', ... in the same way that ncgen3 did. 3. The code for generate.c and genchar.c needed some refactoring to make it a little simpler (but not simple).
52 lines
884 B
Plaintext
52 lines
884 B
Plaintext
netcdf ref_tst_names {
|
|
dimensions:
|
|
\1dim = 1 ;
|
|
dim-name-dashes = 2 ;
|
|
dim.name.dots = 3 ;
|
|
dim+name+plusses = 4 ;
|
|
dim@name@ats = 5 ;
|
|
variables:
|
|
float \1var(\1dim) ;
|
|
\1var:\234att = 3 ;
|
|
\1var:att-name-dashes = 4 ;
|
|
\1var:att.name.dots = 5 ;
|
|
\1var:att+name+plusses = 6 ;
|
|
\1var:att@name@ats = 7 ;
|
|
double var-name-dashes ;
|
|
double var.name.dots ;
|
|
double var+name+plusses ;
|
|
double var@name@ats ;
|
|
|
|
// global attributes:
|
|
:\5Gatt = -1 ;
|
|
:Gatt-name-dashes = -1 ;
|
|
:Gatt.name.dots = -2 ;
|
|
:Gatt+name+plusses = -3 ;
|
|
:Gatt@name@ats = -4 ;
|
|
data:
|
|
|
|
\1var = _ ;
|
|
|
|
var-name-dashes = _ ;
|
|
|
|
var.name.dots = _ ;
|
|
|
|
var+name+plusses = _ ;
|
|
|
|
var@name@ats = _ ;
|
|
|
|
group: \1g- {
|
|
dimensions:
|
|
dim\ 1 = 1 ;
|
|
variables:
|
|
float var\ 1(dim\ 1) ;
|
|
var\ 1:units\ mks = "km/hour" ;
|
|
|
|
// group attributes:
|
|
:title = "in first group" ;
|
|
data:
|
|
|
|
var\ 1 = _ ;
|
|
} // group \1g-
|
|
}
|