2 Copyright (C) 1997 Free Software Foundation, Inc.
3 Contributed by James Craig Burley.
5 This file is part of GNU Fortran.
7 GNU Fortran is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU Fortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Fortran; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 /* From f/proj.h, which uses #error -- not all C compilers
23 support that, and we want *this* program to be compilable
24 by pretty much any C compiler. */
34 #if !defined(false) || !defined(true)
37 #if !defined(FALSE) || !defined(TRUE)
40 Doggone_Trailing_Comma_Dont_Work = 1
43 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
45 /* Pull in the intrinsics info, but only the doc parts. */
46 #define FFEINTRIN_DOC 1
49 char *family_name (ffeintrinFamily family);
50 static void dumpif (ffeintrinFamily fam);
51 static void dumpendif (void);
52 static void dumpclearif (void);
53 static void dumpem (void);
54 static void dumpgen (int menu, char *name, char *name_uc,
56 static void dumpspec (int menu, char *name, char *name_uc,
58 static void dumpimp (int menu, char *name, char *name_uc, size_t genno, ffeintrinFamily family,
59 ffeintrinImp imp, ffeintrinSpec spec);
60 static char *argument_info_ptr (ffeintrinImp imp, int argno);
61 static char *argument_info_string (ffeintrinImp imp, int argno);
62 static char *argument_name_ptr (ffeintrinImp imp, int argno);
63 static char *argument_name_string (ffeintrinImp imp, int argno);
65 static char *elaborate_if_complex (ffeintrinImp imp, int argno);
66 static char *elaborate_if_maybe_complex (ffeintrinImp imp, int argno);
67 static char *elaborate_if_real (ffeintrinImp imp, int argno);
69 static void print_type_string (char *c);
72 main (int argc, char **argv)
77 Usage: intdoc > intdoc.texi\n\
78 Collects and dumps documentation on g77 intrinsics\n\
79 to the file named intdoc.texi.\n");
87 struct _ffeintrin_name_
93 ffeintrinSpec specific;
96 struct _ffeintrin_gen_
98 char *name; /* Name as seen in program. */
99 ffeintrinSpec specs[2];
102 struct _ffeintrin_spec_
104 char *name; /* Uppercase name as seen in source code,
105 lowercase if no source name, "none" if no
106 name at all (NONE case). */
107 bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
108 ffeintrinFamily family;
109 ffeintrinImp implementation;
112 struct _ffeintrin_imp_
114 char *name; /* Name of implementation. */
115 #if 0 /* FFECOM_targetCURRENT == FFECOM_targetGCC */
116 ffecomGfrt gfrt; /* gfrt index in library. */
117 #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
121 static struct _ffeintrin_name_ names[] = {
122 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) \
123 { UPPER, LOWER, MIXED, FFEINTRIN_ ## GEN, FFEINTRIN_ ## SPEC },
124 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
125 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
126 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
127 #include "intrin.def"
134 static struct _ffeintrin_gen_ gens[] = {
135 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
136 #define DEFGEN(CODE,NAME,SPEC1,SPEC2) \
137 { NAME, { SPEC1, SPEC2, }, },
138 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
139 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
140 #include "intrin.def"
147 static struct _ffeintrin_imp_ imps[] = {
148 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
149 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
150 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
151 #if 0 /* FFECOM_targetCURRENT == FFECOM_targetGCC */
152 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
153 { NAME, FFECOM_gfrt ## GFRT, CONTROL },
154 #elif 1 /* FFECOM_targetCURRENT == FFECOM_targetFFE */
155 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
160 #include "intrin.def"
167 static struct _ffeintrin_spec_ specs[] = {
168 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
169 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
170 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
171 { NAME, CALLABLE, FAMILY, IMP, },
172 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
173 #include "intrin.def"
179 struct cc_pair { ffeintrinImp imp; char *text; };
181 static char *descriptions[FFEINTRIN_imp] = { 0 };
182 static struct cc_pair cc_descriptions[] = {
183 #define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, DESCRIPTION },
188 static char *summaries[FFEINTRIN_imp] = { 0 };
189 static struct cc_pair cc_summaries[] = {
190 #define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, SUMMARY },
196 family_name (ffeintrinFamily family)
200 case FFEINTRIN_familyF77:
203 case FFEINTRIN_familyASC:
206 case FFEINTRIN_familyMIL:
209 case FFEINTRIN_familyGNU:
212 case FFEINTRIN_familyF90:
215 case FFEINTRIN_familyVXT:
218 case FFEINTRIN_familyFVZ:
221 case FFEINTRIN_familyF2C:
224 case FFEINTRIN_familyF2U:
227 case FFEINTRIN_familyBADU77:
228 return "familyBADU77";
231 assert ("bad family" == NULL);
236 static int in_ifset = 0;
237 static ffeintrinFamily latest_family = FFEINTRIN_familyNONE;
240 dumpif (ffeintrinFamily fam)
242 assert (fam != FFEINTRIN_familyNONE);
244 || (fam != latest_family))
247 printf ("@end ifset\n");
249 printf ("@ifset %s\n", family_name (fam));
264 || (latest_family != FFEINTRIN_familyNONE))
265 printf ("@end ifset\n");
266 latest_family = FFEINTRIN_familyNONE;
275 for (i = 0; ((size_t) i) < ARRAY_SIZE (cc_descriptions); ++i)
277 assert (descriptions[cc_descriptions[i].imp] == NULL);
278 descriptions[cc_descriptions[i].imp] = cc_descriptions[i].text;
281 for (i = 0; ((size_t) i) < ARRAY_SIZE (cc_summaries); ++i)
283 assert (summaries[cc_summaries[i].imp] == NULL);
284 summaries[cc_summaries[i].imp] = cc_summaries[i].text;
287 printf ("@c This file is automatically derived from intdoc.c, intdoc.in,\n");
288 printf ("@c ansify.c, intrin.def, and intrin.h. Edit those files instead.\n");
290 for (i = 0; ((size_t) i) < ARRAY_SIZE (names); ++i)
292 if (names[i].generic != FFEINTRIN_genNONE)
293 dumpgen (1, names[i].name_ic, names[i].name_uc,
295 if (names[i].specific != FFEINTRIN_specNONE)
296 dumpspec (1, names[i].name_ic, names[i].name_uc,
301 printf ("@end menu\n\n");
303 for (i = 0; ((size_t) i) < ARRAY_SIZE (names); ++i)
305 if (names[i].generic != FFEINTRIN_genNONE)
306 dumpgen (0, names[i].name_ic, names[i].name_uc,
308 if (names[i].specific != FFEINTRIN_specNONE)
309 dumpspec (0, names[i].name_ic, names[i].name_uc,
316 dumpgen (int menu, char *name, char *name_uc, ffeintrinGen gen)
323 for (i = 0; i < ARRAY_SIZE (gens[gen].specs); ++i)
325 if (gens[gen].specs[i] != FFEINTRIN_specNONE)
330 for (i = 0; i < ARRAY_SIZE (gens[gen].specs); ++i)
335 if ((spec = gens[gen].specs[i]) == FFEINTRIN_specNONE)
338 dumpif (specs[spec].family);
339 dumpimp (menu, name, name_uc, i, specs[spec].family, specs[spec].implementation,
341 if (!menu && (total > 0))
346 For information on another intrinsic with the same name:\n");
351 For information on other intrinsics with the same name:\n");
353 for (j = 0; j < ARRAY_SIZE (gens[gen].specs); ++j)
357 if ((spec = gens[gen].specs[j]) == FFEINTRIN_specNONE)
359 printf ("@xref{%s Intrinsic (%s)}.\n",
360 name, specs[spec].name);
369 dumpspec (int menu, char *name, char *name_uc, ffeintrinSpec spec)
371 dumpif (specs[spec].family);
372 dumpimp (menu, name, name_uc, 0, specs[spec].family, specs[spec].implementation,
378 dumpimp (int menu, char *name, char *name_uc, size_t genno, ffeintrinFamily family, ffeintrinImp imp,
388 assert ((imp != FFEINTRIN_impNONE) || !genno);
392 printf ("* %s Intrinsic",
394 if (spec != FFEINTRIN_specNONE)
395 printf (" (%s)", specs[spec].name); /* See XYZZY1 below */
397 #define INDENT_SUMMARY 24
398 if ((imp == FFEINTRIN_impNONE)
399 || (summaries[imp] != NULL))
401 int spaces = INDENT_SUMMARY - 14 - strlen (name);
404 if (spec != FFEINTRIN_specNONE)
405 spaces -= (3 + strlen (specs[spec].name)); /* See XYZZY1 above */
411 if (imp == FFEINTRIN_impNONE)
413 printf ("(Reserved for future use.)\n");
417 for (c = summaries[imp]; c[0] != '\0'; ++c)
423 int argno = c[1] - '0';
429 argno = 10 * argno + (c[0] - '0');
432 assert (c[0] == '@');
435 else if (argno == 99)
436 { /* Yeah, this is a major kludge. */
438 spaces = INDENT_SUMMARY + 1;
443 printf ("%s", argument_name_string (imp, argno - 1));
446 fputc (c[0], stdout);
453 printf ("@node %s Intrinsic", name);
454 if (spec != FFEINTRIN_specNONE)
455 printf (" (%s)", specs[spec].name);
456 printf ("\n@subsubsection %s Intrinsic", name);
457 if (spec != FFEINTRIN_specNONE)
458 printf (" (%s)", specs[spec].name);
459 printf ("\n@cindex %s intrinsic\n@cindex intrinsics, %s\n",
462 if (imp == FFEINTRIN_impNONE)
465 This intrinsic is not yet implemented.\n\
466 The name is, however, reserved as an intrinsic.\n\
467 Use @samp{EXTERNAL %s} to use this name for an\n\
468 external procedure.\n\
475 c = imps[imp].control;
476 subr = (c[0] == '-');
477 colon = (c[2] == ':') ? 2 : 3;
483 (subr ? "CALL " : ""), name);
487 for (argno = 0; ; ++argno)
489 argc = argument_name_ptr (imp, argno);
494 printf ("@var{%s}", argc);
495 argi = argument_info_string (imp, argno);
500 printf ("-1, @var{%s}-2, @dots{}, @var{%s}-n",
515 if ((c[colon + 1] >= '0')
516 && (c[colon + 1] <= '9'))
518 other_arg = c[colon + 1] - '0';
519 arg_string = argument_name_string (imp, other_arg);
520 arg_info = argument_info_string (imp, other_arg);
532 print_type_string (c);
533 printf (" function");
538 assert (other_arg >= 0);
540 if ((arg_info[0] == '?') || (arg_info[0] == '!') || (arg_info[0] == '+')
541 || (arg_info[0] == '*') || (arg_info[0] == 'n') || (arg_info[0] == 'p'))
543 if ((arg_info[0] == 'F') || (arg_info[0] == 'N'))
545 The exact type is @samp{REAL(KIND=1)} when argument @var{%s} is\n\
546 any type other than @code{COMPLEX}, or when it is @code{COMPLEX(KIND=1)}.\n\
547 When @var{%s} is any @code{COMPLEX} type other than @code{COMPLEX(KIND=1)},\n\
548 this intrinsic is valid only when used as the argument to\n\
549 @code{REAL()}, as explained below.\n\n",
554 This intrinsic is valid when argument @var{%s} is\n\
555 @code{COMPLEX(KIND=1)}.\n\
556 When @var{%s} is any other @code{COMPLEX} type,\n\
557 this intrinsic is valid only when used as the argument to\n\
558 @code{REAL()}, as explained below.\n\n",
563 else if ((c[0] == 'I')
565 printf (", the exact type being wide enough to hold a pointer\n\
566 on the target system (typically @code{INTEGER(KIND=1)} or @code{INTEGER(KIND=4)}).\n\n");
568 else if ((c[1] == '=')
569 && (c[colon + 1] >= '0')
570 && (c[colon + 1] <= '9'))
572 assert (other_arg >= 0);
574 if ((arg_info[0] == '?') || (arg_info[0] == '!') || (arg_info[0] == '+')
575 || (arg_info[0] == '*') || (arg_info[0] == 'n') || (arg_info[0] == 'p'))
578 if (((c[0] == arg_info[0])
579 && ((c[0] == 'A') || (c[0] == 'C') || (c[0] == 'I')
580 || (c[0] == 'L') || (c[0] == 'R')))
582 && (arg_info[0] == 'C'))
584 && (arg_info[0] == 'R')))
585 printf (", the @samp{KIND=} value of the type being that of argument @var{%s}.\n\n",
587 else if ((c[0] == 'S')
588 && ((arg_info[0] == 'C')
589 || (arg_info[0] == 'F')
590 || (arg_info[0] == 'N')))
592 The exact type depends on that of argument @var{%s}---if @var{%s} is\n\
593 @code{COMPLEX}, this function's type is @code{REAL}\n\
594 with the same @samp{KIND=} value as the type of @var{%s}.\n\
595 Otherwise, this function's type is the same as that of @var{%s}.\n\n",
596 arg_string, arg_string, arg_string, arg_string);
598 printf (", the exact type being that of argument @var{%s}.\n\n",
601 else if ((c[1] == '=')
602 && (c[colon + 1] == '*'))
603 printf (", the exact type being the result of cross-promoting the\n\
604 types of all the arguments.\n\n");
605 else if (c[1] == '=')
606 assert ("?0:?:" == NULL);
611 for (argno = 0, argc = &c[colon + 3]; *argc != '\0'; ++argno)
613 char optionality = '\0';
627 printf ("%c", *argc);
638 optionality = *(argc++);
643 length = *++argc - '0';
645 length = 10 * length + (*(argc++) - '0');
652 elements = *++argc - '0';
654 elements = 10 * elements + (*(argc++) - '0');
657 else if (*argc == '&')
682 assert ("kind arg" == NULL);
688 assert ((kind == '1') || (kind == '*'));
689 printf ("@code{CHARACTER");
691 printf ("*%d", length);
699 printf ("@code{COMPLEX}");
702 case '1': case '2': case '3': case '4': case '5':
703 case '6': case '7': case '8': case '9':
704 printf ("@code{COMPLEX(KIND=%d)}", (kind - '0'));
708 printf ("Same @samp{KIND=} value as for @var{%s}",
709 argument_name_string (imp, 0));
713 assert ("Ca" == NULL);
722 printf ("@code{INTEGER}");
725 case '1': case '2': case '3': case '4': case '5':
726 case '6': case '7': case '8': case '9':
727 printf ("@code{INTEGER(KIND=%d)}", (kind - '0'));
731 printf ("@code{INTEGER} with same @samp{KIND=} value as for @var{%s}",
732 argument_name_string (imp, 0));
736 assert ("Ia" == NULL);
745 printf ("@code{LOGICAL}");
748 case '1': case '2': case '3': case '4': case '5':
749 case '6': case '7': case '8': case '9':
750 printf ("@code{LOGICAL(KIND=%d)}", (kind - '0'));
754 printf ("@code{LOGICAL} with same @samp{KIND=} value as for @var{%s}",
755 argument_name_string (imp, 0));
759 assert ("La" == NULL);
768 printf ("@code{REAL}");
771 case '1': case '2': case '3': case '4': case '5':
772 case '6': case '7': case '8': case '9':
773 printf ("@code{REAL(KIND=%d)}", (kind - '0'));
777 printf ("@code{REAL} with same @samp{KIND=} value as for @var{%s}",
778 argument_name_string (imp, 0));
782 assert ("Ra" == NULL);
791 printf ("@code{INTEGER} or @code{LOGICAL}");
794 case '1': case '2': case '3': case '4': case '5':
795 case '6': case '7': case '8': case '9':
796 printf ("@code{INTEGER(KIND=%d)} or @code{LOGICAL(KIND=%d)}",
797 (kind - '0'), (kind - '0'));
801 printf ("Same type and @samp{KIND=} value as for @var{%s}",
802 argument_name_string (imp, 0));
806 assert ("Ba" == NULL);
815 printf ("@code{REAL} or @code{COMPLEX}");
818 case '1': case '2': case '3': case '4': case '5':
819 case '6': case '7': case '8': case '9':
820 printf ("@code{REAL(KIND=%d)} or @code{COMPLEX(KIND=%d)}",
821 (kind - '0'), (kind - '0'));
825 printf ("Same type as @var{%s}",
826 argument_name_string (imp, 0));
830 assert ("Fa" == NULL);
839 printf ("@code{INTEGER}, @code{REAL}, or @code{COMPLEX}");
842 case '1': case '2': case '3': case '4': case '5':
843 case '6': case '7': case '8': case '9':
844 printf ("@code{INTEGER(KIND=%d)}, @code{REAL(KIND=%d)}, or @code{COMPLEX(KIND=%d)}",
845 (kind - '0'), (kind - '0'), (kind - '0'));
849 assert ("N1" == NULL);
858 printf ("@code{INTEGER} or @code{REAL}");
861 case '1': case '2': case '3': case '4': case '5':
862 case '6': case '7': case '8': case '9':
863 printf ("@code{INTEGER(KIND=%d)} or @code{REAL(KIND=%d)}",
864 (kind - '0'), (kind - '0'));
868 printf ("@code{INTEGER} or @code{REAL} with same @samp{KIND=} value as for @var{%s}",
869 argument_name_string (imp, 0));
873 assert ("Sa" == NULL);
879 printf ("@samp{*@var{label}}, where @var{label} is the label\n\
880 of an executable statement");
884 printf ("Signal handler (@code{INTEGER FUNCTION} or @code{SUBROUTINE})\n\
885 or dummy/global @code{INTEGER(KIND=1)} scalar");
889 assert ("arg type?" == NULL);
899 printf ("; OPTIONAL (must be omitted if @var{%s} is @code{COMPLEX})",
900 argument_name_string (imp, argno-1));
904 printf ("; OPTIONAL");
908 printf ("; OPTIONAL");
916 printf ("; at least two such arguments must be provided");
920 assert ("optionality!" == NULL);
936 assert (extra != '\0');
937 printf ("; DIMENSION(%d)", elements);
946 printf ("; INTENT(IN)");
953 printf ("; cannot be a constant or expression");
957 printf ("; INTENT(OUT)");
961 printf ("; INTENT(INOUT)");
970 Intrinsic groups: ");
973 case FFEINTRIN_familyF77:
974 printf ("(standard FORTRAN 77).");
977 case FFEINTRIN_familyGNU:
978 printf ("@code{gnu}.");
981 case FFEINTRIN_familyASC:
982 printf ("@code{f2c}, @code{f90}.");
985 case FFEINTRIN_familyMIL:
986 printf ("@code{mil}, @code{f90}, @code{vxt}.");
989 case FFEINTRIN_familyF90:
990 printf ("@code{f90}.");
993 case FFEINTRIN_familyVXT:
994 printf ("@code{vxt}.");
997 case FFEINTRIN_familyFVZ:
998 printf ("@code{f2c}, @code{vxt}.");
1001 case FFEINTRIN_familyF2C:
1002 printf ("@code{f2c}.");
1005 case FFEINTRIN_familyF2U:
1006 printf ("@code{unix}.");
1009 case FFEINTRIN_familyBADU77:
1010 printf ("@code{badu77}.");
1014 assert ("bad family" == NULL);
1015 printf ("@code{???}.");
1020 if (descriptions[imp] != NULL)
1022 char *c = descriptions[imp];
1029 while (c[0] != '\0')
1035 int argno = c[1] - '0';
1038 while ((c[0] >= '0')
1041 argno = 10 * argno + (c[0] - '0');
1044 assert (c[0] == '@');
1046 printf ("%s", name_uc);
1048 printf ("%s", argument_name_string (imp, argno - 1));
1051 fputc (c[0], stdout);
1060 argument_info_ptr (ffeintrinImp imp, int argno)
1062 char *c = imps[imp].control;
1063 static char arginfos[8][32];
1064 static int argx = 0;
1074 while ((c[0] != ',') && (c[0] != '\0'))
1084 for (; (c[0] != '=') && (c[0] != '\0'); ++c)
1087 assert (c[0] == '=');
1089 for (i = 0, ++c; (c[0] != ',') && (c[0] != '\0'); ++c, ++i)
1090 arginfos[argx][i] = c[0];
1092 arginfos[argx][i] = '\0';
1094 c = &arginfos[argx][0];
1096 if (((size_t) argx) >= ARRAY_SIZE (arginfos))
1103 argument_info_string (ffeintrinImp imp, int argno)
1107 p = argument_info_ptr (imp, argno);
1113 argument_name_ptr (ffeintrinImp imp, int argno)
1115 char *c = imps[imp].control;
1116 static char argnames[8][32];
1117 static int argx = 0;
1127 while ((c[0] != ',') && (c[0] != '\0'))
1137 for (i = 0; (c[0] != '=') && (c[0] != '\0'); ++c, ++i)
1138 argnames[argx][i] = c[0];
1140 assert (c[0] == '=');
1141 argnames[argx][i] = '\0';
1143 c = &argnames[argx][0];
1145 if (((size_t) argx) >= ARRAY_SIZE (argnames))
1152 argument_name_string (ffeintrinImp imp, int argno)
1156 p = argument_name_ptr (imp, argno);
1162 print_type_string (char *c)
1170 assert ((kind == '1') || (kind == '='));
1172 printf ("@code{CHARACTER*1}");
1175 assert (c[2] == '*');
1176 printf ("@code{CHARACTER*(*)}");
1184 printf ("@code{COMPLEX}");
1187 case '1': case '2': case '3': case '4': case '5':
1188 case '6': case '7': case '8': case '9':
1189 printf ("@code{COMPLEX(KIND=%d)}", (kind - '0'));
1193 assert ("Ca" == NULL);
1202 printf ("@code{INTEGER}");
1205 case '1': case '2': case '3': case '4': case '5':
1206 case '6': case '7': case '8': case '9':
1207 printf ("@code{INTEGER(KIND=%d)}", (kind - '0'));
1211 assert ("Ia" == NULL);
1220 printf ("@code{LOGICAL}");
1223 case '1': case '2': case '3': case '4': case '5':
1224 case '6': case '7': case '8': case '9':
1225 printf ("@code{LOGICAL(KIND=%d)}", (kind - '0'));
1229 assert ("La" == NULL);
1238 printf ("@code{REAL}");
1241 case '1': case '2': case '3': case '4': case '5':
1242 case '6': case '7': case '8': case '9':
1243 printf ("@code{REAL(KIND=%d)}", (kind - '0'));
1247 printf ("@code{REAL}");
1251 assert ("Ra" == NULL);
1260 printf ("@code{INTEGER} or @code{LOGICAL}");
1263 case '1': case '2': case '3': case '4': case '5':
1264 case '6': case '7': case '8': case '9':
1265 printf ("@code{INTEGER(KIND=%d)} or @code{LOGICAL(KIND=%d)}",
1266 (kind - '0'), (kind - '0'));
1270 assert ("Ba" == NULL);
1279 printf ("@code{REAL} or @code{COMPLEX}");
1282 case '1': case '2': case '3': case '4': case '5':
1283 case '6': case '7': case '8': case '9':
1284 printf ("@code{REAL(KIND=%d)} or @code{COMPLEX(KIND=%d)}",
1285 (kind - '0'), (kind - '0'));
1289 assert ("Fa" == NULL);
1298 printf ("@code{INTEGER}, @code{REAL}, or @code{COMPLEX}");
1301 case '1': case '2': case '3': case '4': case '5':
1302 case '6': case '7': case '8': case '9':
1303 printf ("@code{INTEGER(KIND=%d)}, @code{REAL(KIND=%d)}, or @code{COMPLEX(KIND=%d)}",
1304 (kind - '0'), (kind - '0'), (kind - '0'));
1308 assert ("N1" == NULL);
1317 printf ("@code{INTEGER} or @code{REAL}");
1320 case '1': case '2': case '3': case '4': case '5':
1321 case '6': case '7': case '8': case '9':
1322 printf ("@code{INTEGER(KIND=%d)} or @code{REAL(KIND=%d)}",
1323 (kind - '0'), (kind - '0'));
1327 assert ("Sa" == NULL);
1333 assert ("type?" == NULL);