Declaration: ReadJCampDXSpec (FName: string; var Title: string; var SpecType: TLayerType; var Spec: TSpectrum): integer;
The function ReadJCampDXSpec reads a single spectrum from a JCAMP/DX file. The parameter FName specifies the full file path of the JCAMP/DX file. The variable parameter Spectrum returns the read spectrum, it is automatically resized to hold the entire spectrum. The variable parameter Title returns the title of the spectrum and the parameter SpecType returns the type of the spectrum.

The function returns the following error codes:

 0 ... everything is OK, the JCAMP/DX file has been read
-1 ... the file does not exist

Last Update: 2018-Apr-23