Returns the number of readable blocks in an Open GENIE recognized file.
| NBLOCKS() | [file=String] | Return number of blocks in an intermediate file, or number of spectra in a raw file |
example:
# Check the number of spectra in a raw # file then do a multiplot >> Set/File/Input "hrp00345.raw" >> n = nblocks() >> multiplot 1:(n)
Note: For an ISIS raw file the above use of Nblocks() is equivalent to Get("NSP1").
![]()
Returns the number of blocks the Get() command would be able to read when reading by block number. Put in another way for a file "d.dat" the command Get(Nblocks("d.dat"), "d.dat") will access the last block in the file.
File (String) [ default = default input file ]
Any file of a type which can be recognised by Open GENIE.
RESULT = (Integer)
Returns the number of the highest block in the file.