source: trunk/bindings/swig/nxdstest.tcl @ 1822

Revision 211, 749 bytes checked in by nexus, 9 years ago (diff)
  • Fixed a bug which caused foreign HDF-5's not to be read properly
  • Fixed a bug in NXgetnextentry which prevented reinitialising searches and nested searches.
  • Adapted the jnexus stuff to NAPI-2.0
  • Added the swig interface to NeXus to the source tree
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#-------------------------------------------------------------------------
2# NX_Dataset testing code for Tcl
3#
4# copyright: GPL
5#
6# Mark Koennecke, October 2002
7#-------------------------------------------------------------------------
8
9set ds [create_nxds 2 $NX_FLOAT32 3 3]
10
11put_nxds_value $ds 1 0 0
12put_nxds_value $ds 1 1 1
13put_nxds_value $ds 1 2 2
14
15puts stdout [format "rank = %d" [get_nxds_rank $ds]]
16puts stdout [format "type = %d" [get_nxds_type $ds]]
17puts stdout [format "dim1 = %d" [get_nxds_dim $ds 1]]
18
19for {set i 0} {$i < 3} {incr i} {
20    puts stdout " "
21    for {set j 0} {$j < 3} {incr j} {
22        puts -nonewline stdout [format " %f" [get_nxds_value $ds $i $j]]
23    }
24}
25puts stdout "     "
26puts stdout "Hmmmmmmmhhh......."
27
28 drop_nxds $ds
Note: See TracBrowser for help on using the repository browser.