- msg (SE, _("%s is not of the same type as %s. To specify "
- "variables of different types in the same variable "
- "list, use a FORTRAN-like format specifier."),
- fx.v[i]->name, fx.v[0]->name);
- return 0;
- }
-
- if (!lex_force_int ())
- return 0;
- fx.fc = lex_integer () - 1;
- if (fx.fc < 0)
- {
- msg (SE, _("Column positions for fields must be positive."));
- return 0;
- }
- lex_get ();
-
- lex_negative_to_dash ();
- if (lex_match ('-'))
- {
- if (!lex_force_int ())
- return 0;
- fx.lc = lex_integer () - 1;
- if (fx.lc < 0)
- {
- msg (SE, _("Column positions for fields must be positive."));
- return 0;
- }
- else if (fx.lc < fx.fc)
- {
- msg (SE, _("The ending column for a field must not "
- "be less than the starting column."));
- return 0;
- }
- lex_get ();
- }
- else
- fx.lc = fx.fc;
-
- fx.spec.u.v.f.w = fx.lc - fx.fc + 1;
- if (lex_match ('('))
- {
- struct fmt_desc *fdp;
-
- if (token == T_ID)
- {
- const char *cp;
-
- fx.spec.u.v.f.type = parse_format_specifier_name (&cp, 0);
- if (fx.spec.u.v.f.type == -1)
- return 0;
- if (*cp)
- {
- msg (SE, _("A format specifier on this line "
- "has extra characters on the end."));
- return 0;
- }
- lex_get ();
- lex_match (',');
- }
- else
- fx.spec.u.v.f.type = FMT_F;
-
- if (lex_is_number ())
- {
- if (!lex_force_int ())
- return 0;
- if (lex_integer () < 1)
- {
- msg (SE, _("The value for number of decimal places "
- "must be at least 1."));
- return 0;
- }
- fx.spec.u.v.f.d = lex_integer ();
- lex_get ();
- }
- else
- fx.spec.u.v.f.d = 0;
-
- fdp = &formats[fx.spec.u.v.f.type];
- if (fdp->n_args < 2 && fx.spec.u.v.f.d)
- {
- msg (SE, _("Input format %s doesn't accept decimal places."),
- fdp->name);
- return 0;
- }
- if (fx.spec.u.v.f.d > 16)
- fx.spec.u.v.f.d = 16;
-
- if (!lex_force_match (')'))
- return 0;
- }
- else
- {
- fx.spec.u.v.f.type = FMT_F;
- fx.spec.u.v.f.d = 0;
- }
-
- fx.sc = fx.lc + 1;
-
- if ((fx.lc - fx.fc + 1) % fx.nv)
- {
- msg (SE, _("The %d columns %d-%d can't be evenly divided into %u "
- "fields."),
- fx.lc - fx.fc + 1, fx.fc + 1, fx.lc + 1, (unsigned) fx.nv);
- return 0;
- }