#
# CIF data structure, attempt 3
#

my @cif = (
   \%cif_datablock_1, \%cif_datablock_2
);

## my %cif = (
##    datablock_names => [
##        "datablock_name_1", "datablock_name_2"
##    ],
##    datablocks => {
##        datablock_name_1 => \@cif_datablock_1,
##        datablock_name_2 => \@cif_datablock_2
##    }
## );

my %cif_datablock_1 = (

   name => "datablock_name_1",

   values => {

       _tag => [ "value" ],
    
       _tag2 => [ "10.1" ],
    
       _looped_tag_1 => [ "val1", "val2", "val3" ],
    
       _looped_tag_2 => [ "1.2(2)", "2.3", "3.40(12)" ],

       _looped_tag_3 => [ "val1", "val2", "val3" ],
    
       _looped_tag_4 => [ "11.2(2)", "22.3", "13.40(12)" ],

   },

   precisions => {

       _tag2 => [ 0.33 ],

       _looped_tag_2 => [ 0.2, undef, 0.12 ],

       _looped_tag_4 => [ 0.2, undef, 0.12 ],
   },

   types => {
       _tag => [ "DQSTRING" ],
    
       _tag2 => [ "FLOAT" ],
    
       _looped_tag_1 => [ "DQSTRING", "SQSTRING", "UQSTRING" ],
    
       _looped_tag_2 => [ "FLOAT", "FLOAT", "FLOAT" ],

       _looped_tag_3 => [ "DQSTRING", "DQSTRING", "DQSTRING" ],
    
       _looped_tag_4 => [ "FLOAT", "FLOAT", "FLOAT" ],

   },

   tags => [
       "_tag", "_tag2", "_looped_tag_1", "_looped_tag_2",
       "_looped_tag_3", "_looped_tag_4"
   ],

   loops => [
       [ "_looped_tag_1", "_looped_tag_2" ],
       [ "_looped_tag_3", "_looped_tag_4" ],
   ],

   inloop => {
       _looped_tag_1 => 0, # [ 0, "_looped_tag_1", "_looped_tag_2" ],
       _looped_tag_2 => 0, # [ 0, "_looped_tag_1", "_looped_tag_2" ],
       _looped_tag_3 => 1, # [ 1, "_looped_tag_3", "_looped_tag_4" ],
       _looped_tag_4 => 1, # [ 1, "_looped_tag_3", "_looped_tag_4" ],
   },

   save_blocks => [
       \%save_datablock_has_the_same_structure_as_a_cif_datablock,
       \%another_save_datablock
   ]

);

my %cif_values = (

   _tag => [ "value" ],

   _tag2 => [ "10.1" ],

   _looped_tag_1 => [ "val1", "val2", "val3" ],

   _looped_tag_2 => [ "1.2", "2.3", "3.4" ],

);

my %cif_precisionss = (

   _tag2 => [ "0.33" ],

   _looped_tag_2 => [ 0.2, undef, 0.12 ],

);
