27 |
#include "command.h" |
#include "command.h" |
28 |
#include "dfm-write.h" |
#include "dfm-write.h" |
29 |
#include "error.h" |
#include "error.h" |
30 |
#include "expr.h" |
#include "expressions/public.h" |
31 |
#include "file-handle.h" |
#include "file-handle.h" |
32 |
#include "lexer.h" |
#include "lexer.h" |
33 |
#include "misc.h" |
#include "misc.h" |
599 |
|
|
600 |
dividend = (fx.lc - fx.fc + 1) / fx.nv; |
dividend = (fx.lc - fx.fc + 1) / fx.nv; |
601 |
fx.spec.u.v.f.w = dividend; |
fx.spec.u.v.f.w = dividend; |
602 |
if (!check_output_specifier (&fx.spec.u.v.f)) |
if (!check_output_specifier (&fx.spec.u.v.f, 1)) |
603 |
return 0; |
return 0; |
604 |
if ((type == ALPHA) ^ (formats[fx.spec.u.v.f.type].cat & FCAT_STRING)) |
if ((type == ALPHA) ^ (formats[fx.spec.u.v.f.type].cat & FCAT_STRING)) |
605 |
{ |
{ |
748 |
} |
} |
749 |
else if (lex_match ('/')) |
else if (lex_match ('/')) |
750 |
fl->f.type = FMT_NEWREC; |
fl->f.type = FMT_NEWREC; |
751 |
else if (!parse_format_specifier (&fl->f, 1) |
else if (!parse_format_specifier (&fl->f, FMTP_ALLOW_XT) |
752 |
|| !check_output_specifier (&fl->f)) |
|| !check_output_specifier (&fl->f, 1)) |
753 |
goto fail; |
goto fail; |
754 |
|
|
755 |
lex_match (','); |
lex_match (','); |
1041 |
|
|
1042 |
if (token != '.') |
if (token != '.') |
1043 |
{ |
{ |
1044 |
e = expr_parse (EXPR_NUMERIC); |
e = expr_parse (default_dict, EXPR_NUMBER); |
1045 |
if (token != '.') |
if (token != '.') |
1046 |
{ |
{ |
1047 |
expr_free (e); |
expr_free (e); |
1082 |
int case_num UNUSED) |
int case_num UNUSED) |
1083 |
{ |
{ |
1084 |
struct print_space_trns *t = (struct print_space_trns *) trns; |
struct print_space_trns *t = (struct print_space_trns *) trns; |
1085 |
int n; |
double n = 1.; |
1086 |
|
|
1087 |
if (t->e) |
if (t->e) |
1088 |
{ |
{ |
1089 |
union value v; |
n = expr_evaluate_num (t->e, c, case_num); |
1090 |
|
if (n == SYSMIS) |
1091 |
expr_evaluate (t->e, c, case_num, &v); |
msg (SW, _("The expression on PRINT SPACE evaluated to the " |
1092 |
n = v.f; |
"system-missing value.")); |
1093 |
if (n < 0) |
else if (n < 0) |
1094 |
{ |
msg (SW, _("The expression on PRINT SPACE evaluated to %g."), n); |
1095 |
msg (SW, _("The expression on PRINT SPACE evaluated to %d. It's " |
n = 1.; |
|
"not possible to PRINT SPACE a negative number of " |
|
|
"lines."), |
|
|
n); |
|
|
n = 1; |
|
|
} |
|
1096 |
} |
} |
|
else |
|
|
n = 1; |
|
1097 |
|
|
1098 |
if (t->writer == NULL) |
if (t->writer == NULL) |
1099 |
while (n--) |
while (n--) |