Declaration: ReadJCampDXSpec (FName: string; var Title: string; var SpecType: TLayerType; var Spec: TSpectrum; var XUnits: TDXXUnits; var YUnits: TDXYUnits): 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 variable parameters XUnits and YUnits return the units of measurement of the x- and the y-axis, respectively.

The function returns the following error codes:

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