program GenerateResStr;

{$mode objfpc}{$H+}

uses
  uConst, uInit, Classes, SysUtils;

var
  I: integer;
  F: Text;
  FName: TFilename;

begin
  FName := '/home/jeff/src/pascal/massmol/strgen.pas';
  Assign(F, FName);
  Rewrite(F);
  InitTable;
  if TestTable then
    for I := 1 to AtomNumber do
    begin
      Write(F, '  rs' + ElementsArray[I].ShortName + ' = ''' +
        ElementsArray[I].Name + ''';'#13#10);
      Write(F, '  rs' + ElementsArray[I].ShortName + 'Etymo = ''' +
        ElementsArray[I].Etymology + ''';'#13#10);
    end
  else
    Writeln('FATAL: The periodic table contains errors... Please correct it before processing!');
  Writeln('DONE: Constants writen successfully. You can know use it.');
  Close(F);
end.

