def METHOD_NAME(f, tables, Z_begin, Z_end, define_noval=0):
  print("namespace table_data {", file=f)
  print(file=f)
  print("using anomalous::e_fp_fdp;", file=f)
  print(file=f)
  # Visual C++ 7.0 compilation is very slow with define_noval=1
  if (define_noval): print("#define NOVAL fp_fdp_undefined", file=f)
  for Z in range(Z_begin, Z_end):
    tab = tables[Z]
    print("e_fp_fdp " + tab[0].lower() \
      + "[] = { /* Z = " + str(Z) + " */", file=f)
    for line in tab[1]:
      flds = line.split()
      assert len(flds) == 3
      if (define_noval and flds[1] == "-9999.00"): flds[1] = "NOVAL"
      print("{%s, %s, %s}," % tuple(flds), file=f)
    print("{0, 0, 0}", file=f)
    print("};", file=f)
    print(file=f)
  if (define_noval):
    print("#undef NOVAL", file=f)
    print(file=f)
  print("} // namespace table_data", file=f)
  print(file=f)
  print("}}} // namespace cctbx::eltbx::henke", file=f)