2 Copyright (C) 1997, 2000, 2001, 2003
3 Free Software Foundation, Inc.
4 Contributed by James Craig Burley.
6 This file is part of GNU Fortran.
8 GNU Fortran is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 GNU Fortran is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Fortran; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 /* From f/proj.h, which uses #error -- not all C compilers
24 support that, and we want *this* program to be compilable
25 by pretty much any C compiler. */
28 #include "coretypes.h"
32 /* Pull in the intrinsics info, but only the doc parts. */
33 #define FFEINTRIN_DOC 1
36 const char *family_name (ffeintrinFamily family);
37 static void dumpif (ffeintrinFamily fam);
38 static void dumpendif (void);
39 static void dumpclearif (void);
40 static void dumpem (void);
41 static void dumpgen (int menu, const char *name, const char *name_uc,
43 static void dumpspec (int menu, const char *name, const char *name_uc,
45 static void dumpimp (int menu, const char *name, const char *name_uc, size_t genno, ffeintrinFamily family,
46 ffeintrinImp imp, ffeintrinSpec spec);
47 static const char *argument_info_ptr (ffeintrinImp imp, int argno);
48 static const char *argument_info_string (ffeintrinImp imp, int argno);
49 static const char *argument_name_ptr (ffeintrinImp imp, int argno);
50 static const char *argument_name_string (ffeintrinImp imp, int argno);
52 static const char *elaborate_if_complex (ffeintrinImp imp, int argno);
53 static const char *elaborate_if_maybe_complex (ffeintrinImp imp, int argno);
54 static const char *elaborate_if_real (ffeintrinImp imp, int argno);
56 static void print_type_string (const char *c);
59 main (int argc, char **argv ATTRIBUTE_UNUSED)
64 Usage: intdoc > intdoc.texi\n\
65 Collects and dumps documentation on g77 intrinsics\n\
66 to the file named intdoc.texi.\n");
74 struct _ffeintrin_name_
76 const char *const name_uc;
77 const char *const name_lc;
78 const char *const name_ic;
79 const ffeintrinGen generic;
80 const ffeintrinSpec specific;
83 struct _ffeintrin_gen_
85 const char *const name; /* Name as seen in program. */
86 const ffeintrinSpec specs[2];
89 struct _ffeintrin_spec_
91 const char *const name; /* Uppercase name as seen in source code,
92 lowercase if no source name, "none" if no
93 name at all (NONE case). */
94 const bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
95 const ffeintrinFamily family;
96 const ffeintrinImp implementation;
99 struct _ffeintrin_imp_
101 const char *const name; /* Name of implementation. */
102 const char *const control;
105 static const struct _ffeintrin_name_ names[] = {
106 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) \
107 { UPPER, LOWER, MIXED, FFEINTRIN_ ## GEN, FFEINTRIN_ ## SPEC },
108 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
109 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
110 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
111 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
112 #include "intrin.def"
120 static const struct _ffeintrin_gen_ gens[] = {
121 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
122 #define DEFGEN(CODE,NAME,SPEC1,SPEC2) \
123 { NAME, { SPEC1, SPEC2, }, },
124 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
125 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
126 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
127 #include "intrin.def"
135 static const struct _ffeintrin_imp_ imps[] = {
136 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
137 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
138 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
139 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
141 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
143 #include "intrin.def"
151 static const struct _ffeintrin_spec_ specs[] = {
152 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
153 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
154 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
155 { NAME, CALLABLE, FAMILY, IMP, },
156 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
157 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
158 #include "intrin.def"
165 struct cc_pair { const ffeintrinImp imp; const char *const text; };
167 static const char *descriptions[FFEINTRIN_imp] = { 0 };
168 static const struct cc_pair cc_descriptions[] = {
169 #define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, DESCRIPTION },
174 static const char *summaries[FFEINTRIN_imp] = { 0 };
175 static const struct cc_pair cc_summaries[] = {
176 #define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, SUMMARY },
182 family_name (ffeintrinFamily family)
186 case FFEINTRIN_familyF77:
189 case FFEINTRIN_familyASC:
192 case FFEINTRIN_familyMIL:
195 case FFEINTRIN_familyGNU:
198 case FFEINTRIN_familyF90:
201 case FFEINTRIN_familyVXT:
204 case FFEINTRIN_familyFVZ:
207 case FFEINTRIN_familyF2C:
210 case FFEINTRIN_familyF2U:
213 case FFEINTRIN_familyBADU77:
214 return "familyBADU77";
217 assert ("bad family" == NULL);
222 static int in_ifset = 0;
223 static ffeintrinFamily latest_family = FFEINTRIN_familyNONE;
226 dumpif (ffeintrinFamily fam)
228 assert (fam != FFEINTRIN_familyNONE);
230 || (fam != latest_family))
233 printf ("@end ifset\n");
235 printf ("@ifset %s\n", family_name (fam));
250 || (latest_family != FFEINTRIN_familyNONE))
251 printf ("@end ifset\n");
252 latest_family = FFEINTRIN_familyNONE;
261 for (i = 0; ((size_t) i) < ARRAY_SIZE (cc_descriptions); ++i)
263 assert (descriptions[cc_descriptions[i].imp] == NULL);
264 descriptions[cc_descriptions[i].imp] = cc_descriptions[i].text;
267 for (i = 0; ((size_t) i) < ARRAY_SIZE (cc_summaries); ++i)
269 assert (summaries[cc_summaries[i].imp] == NULL);
270 summaries[cc_summaries[i].imp] = cc_summaries[i].text;
273 printf ("@c This file is automatically derived from intdoc.c, intdoc.in,\n");
274 printf ("@c ansify.c, intrin.def, and intrin.h. Edit those files instead.\n");
276 for (i = 0; ((size_t) i) < ARRAY_SIZE (names); ++i)
278 if (names[i].generic != FFEINTRIN_genNONE)
279 dumpgen (1, names[i].name_ic, names[i].name_uc,
281 if (names[i].specific != FFEINTRIN_specNONE)
282 dumpspec (1, names[i].name_ic, names[i].name_uc,
287 printf ("@end menu\n\n");
289 for (i = 0; ((size_t) i) < ARRAY_SIZE (names); ++i)
291 if (names[i].generic != FFEINTRIN_genNONE)
292 dumpgen (0, names[i].name_ic, names[i].name_uc,
294 if (names[i].specific != FFEINTRIN_specNONE)
295 dumpspec (0, names[i].name_ic, names[i].name_uc,
302 dumpgen (int menu, const char *name, const char *name_uc, ffeintrinGen gen)
309 for (i = 0; i < ARRAY_SIZE (gens[gen].specs); ++i)
311 if (gens[gen].specs[i] != FFEINTRIN_specNONE)
316 for (i = 0; i < ARRAY_SIZE (gens[gen].specs); ++i)
321 if ((spec = gens[gen].specs[i]) == FFEINTRIN_specNONE)
324 dumpif (specs[spec].family);
325 dumpimp (menu, name, name_uc, i, specs[spec].family, specs[spec].implementation,
327 if (!menu && (total > 0))
332 For information on another intrinsic with the same name:\n");
337 For information on other intrinsics with the same name:\n");
339 for (j = 0; j < ARRAY_SIZE (gens[gen].specs); ++j)
343 if ((spec = gens[gen].specs[j]) == FFEINTRIN_specNONE)
345 printf ("@xref{%s Intrinsic (%s)}.\n",
346 name, specs[spec].name);
355 dumpspec (int menu, const char *name, const char *name_uc, ffeintrinSpec spec)
357 dumpif (specs[spec].family);
358 dumpimp (menu, name, name_uc, 0, specs[spec].family, specs[spec].implementation,
364 dumpimp (int menu, const char *name, const char *name_uc, size_t genno,
365 ffeintrinFamily family, ffeintrinImp imp, ffeintrinSpec spec)
374 assert ((imp != FFEINTRIN_impNONE) || !genno);
378 printf ("* %s Intrinsic",
380 if (spec != FFEINTRIN_specNONE)
381 printf (" (%s)", specs[spec].name); /* See XYZZY1 below */
383 #define INDENT_SUMMARY 24
384 if ((imp == FFEINTRIN_impNONE)
385 || (summaries[imp] != NULL))
387 int spaces = INDENT_SUMMARY - 14 - strlen (name);
390 if (spec != FFEINTRIN_specNONE)
391 spaces -= (3 + strlen (specs[spec].name)); /* See XYZZY1 above */
397 if (imp == FFEINTRIN_impNONE)
399 printf ("(Reserved for future use.)\n");
403 for (c = summaries[imp]; c[0] != '\0'; ++c)
405 if (c[0] == '@' && ISDIGIT (c[1]))
407 int argno = c[1] - '0';
410 while (ISDIGIT (c[0]))
412 argno = 10 * argno + (c[0] - '0');
415 assert (c[0] == '@');
418 else if (argno == 99)
419 { /* Yeah, this is a major kludge. */
421 spaces = INDENT_SUMMARY + 1;
426 printf ("%s", argument_name_string (imp, argno - 1));
429 fputc (c[0], stdout);
436 printf ("@node %s Intrinsic", name);
437 if (spec != FFEINTRIN_specNONE)
438 printf (" (%s)", specs[spec].name);
439 printf ("\n@subsubsection %s Intrinsic", name);
440 if (spec != FFEINTRIN_specNONE)
441 printf (" (%s)", specs[spec].name);
442 printf ("\n@cindex %s intrinsic\n@cindex intrinsics, %s\n",
445 if (imp == FFEINTRIN_impNONE)
448 This intrinsic is not yet implemented.\n\
449 The name is, however, reserved as an intrinsic.\n\
450 Use @samp{EXTERNAL %s} to use this name for an\n\
451 external procedure.\n\
458 c = imps[imp].control;
459 subr = (c[0] == '-');
460 colon = (c[2] == ':') ? 2 : 3;
466 (subr ? "CALL " : ""), name);
470 for (argno = 0; ; ++argno)
472 argc = argument_name_ptr (imp, argno);
477 printf ("@var{%s}", argc);
478 argi = argument_info_string (imp, argno);
483 printf ("-1, @var{%s}-2, @dots{}, @var{%s}-n",
495 const char *arg_string;
496 const char *arg_info;
498 if (ISDIGIT (c[colon + 1]))
500 other_arg = c[colon + 1] - '0';
501 arg_string = argument_name_string (imp, other_arg);
502 arg_info = argument_info_string (imp, other_arg);
514 print_type_string (c);
515 printf (" function");
520 assert (other_arg >= 0);
522 if ((arg_info[0] == '?') || (arg_info[0] == '!') || (arg_info[0] == '+')
523 || (arg_info[0] == '*') || (arg_info[0] == 'n') || (arg_info[0] == 'p'))
525 if ((arg_info[0] == 'F') || (arg_info[0] == 'N'))
527 The exact type is @samp{REAL(KIND=1)} when argument @var{%s} is\n\
528 any type other than @code{COMPLEX}, or when it is @code{COMPLEX(KIND=1)}.\n\
529 When @var{%s} is any @code{COMPLEX} type other than @code{COMPLEX(KIND=1)},\n\
530 this intrinsic is valid only when used as the argument to\n\
531 @code{REAL()}, as explained below.\n\n",
536 This intrinsic is valid when argument @var{%s} is\n\
537 @code{COMPLEX(KIND=1)}.\n\
538 When @var{%s} is any other @code{COMPLEX} type,\n\
539 this intrinsic is valid only when used as the argument to\n\
540 @code{REAL()}, as explained below.\n\n",
545 else if ((c[0] == 'I')
547 printf (", the exact type being wide enough to hold a pointer\n\
548 on the target system (typically @code{INTEGER(KIND=1)} or @code{INTEGER(KIND=4)}).\n\n");
550 else if (c[1] == '=' && ISDIGIT (c[colon + 1]))
552 assert (other_arg >= 0);
554 if ((arg_info[0] == '?') || (arg_info[0] == '!') || (arg_info[0] == '+')
555 || (arg_info[0] == '*') || (arg_info[0] == 'n') || (arg_info[0] == 'p'))
558 if (((c[0] == arg_info[0])
559 && ((c[0] == 'A') || (c[0] == 'C') || (c[0] == 'I')
560 || (c[0] == 'L') || (c[0] == 'R')))
562 && (arg_info[0] == 'C'))
564 && (arg_info[0] == 'R')))
565 printf (", the @samp{KIND=} value of the type being that of argument @var{%s}.\n\n",
567 else if ((c[0] == 'S')
568 && ((arg_info[0] == 'C')
569 || (arg_info[0] == 'F')
570 || (arg_info[0] == 'N')))
572 The exact type depends on that of argument @var{%s}---if @var{%s} is\n\
573 @code{COMPLEX}, this function's type is @code{REAL}\n\
574 with the same @samp{KIND=} value as the type of @var{%s}.\n\
575 Otherwise, this function's type is the same as that of @var{%s}.\n\n",
576 arg_string, arg_string, arg_string, arg_string);
578 printf (", the exact type being that of argument @var{%s}.\n\n",
581 else if ((c[1] == '=')
582 && (c[colon + 1] == '*'))
583 printf (", the exact type being the result of cross-promoting the\n\
584 types of all the arguments.\n\n");
585 else if (c[1] == '=')
586 assert ("?0:?:" == NULL);
591 for (argno = 0, argc = &c[colon + 3]; *argc != '\0'; ++argno)
593 char optionality = '\0';
607 printf ("%c", *argc);
618 optionality = *(argc++);
623 length = *++argc - '0';
625 length = 10 * length + (*(argc++) - '0');
632 elements = *++argc - '0';
634 elements = 10 * elements + (*(argc++) - '0');
637 else if (*argc == '&')
662 assert ("kind arg" == NULL);
668 assert ((kind == '1') || (kind == '*'));
669 printf ("@code{CHARACTER");
671 printf ("*%d", length);
679 printf ("@code{COMPLEX}");
682 case '1': case '2': case '3': case '4': case '5':
683 case '6': case '7': case '8': case '9':
684 printf ("@code{COMPLEX(KIND=%d)}", (kind - '0'));
688 printf ("Same @samp{KIND=} value as for @var{%s}",
689 argument_name_string (imp, 0));
693 assert ("Ca" == NULL);
702 printf ("@code{INTEGER}");
705 case '1': case '2': case '3': case '4': case '5':
706 case '6': case '7': case '8': case '9':
707 printf ("@code{INTEGER(KIND=%d)}", (kind - '0'));
711 printf ("@code{INTEGER} with same @samp{KIND=} value as for @var{%s}",
712 argument_name_string (imp, 0));
716 printf ("@code{INTEGER} not wider than the default kind");
720 assert ("Ia" == NULL);
729 printf ("@code{LOGICAL}");
732 case '1': case '2': case '3': case '4': case '5':
733 case '6': case '7': case '8': case '9':
734 printf ("@code{LOGICAL(KIND=%d)}", (kind - '0'));
738 printf ("@code{LOGICAL} with same @samp{KIND=} value as for @var{%s}",
739 argument_name_string (imp, 0));
743 printf ("@code{LOGICAL} not wider than the default kind");
747 assert ("La" == NULL);
756 printf ("@code{REAL}");
759 case '1': case '2': case '3': case '4': case '5':
760 case '6': case '7': case '8': case '9':
761 printf ("@code{REAL(KIND=%d)}", (kind - '0'));
765 printf ("@code{REAL} with same @samp{KIND=} value as for @var{%s}",
766 argument_name_string (imp, 0));
770 assert ("Ra" == NULL);
779 printf ("@code{INTEGER} or @code{LOGICAL}");
782 case '1': case '2': case '3': case '4': case '5':
783 case '6': case '7': case '8': case '9':
784 printf ("@code{INTEGER(KIND=%d)} or @code{LOGICAL(KIND=%d)}",
785 (kind - '0'), (kind - '0'));
789 printf ("Same type and @samp{KIND=} value as for @var{%s}",
790 argument_name_string (imp, 0));
794 printf ("@code{INTEGER} or @code{LOGICAL} not wider than the default kind");
798 assert ("Ba" == NULL);
807 printf ("@code{REAL} or @code{COMPLEX}");
810 case '1': case '2': case '3': case '4': case '5':
811 case '6': case '7': case '8': case '9':
812 printf ("@code{REAL(KIND=%d)} or @code{COMPLEX(KIND=%d)}",
813 (kind - '0'), (kind - '0'));
817 printf ("Same type as @var{%s}",
818 argument_name_string (imp, 0));
822 assert ("Fa" == NULL);
831 printf ("@code{INTEGER}, @code{REAL}, or @code{COMPLEX}");
834 case '1': case '2': case '3': case '4': case '5':
835 case '6': case '7': case '8': case '9':
836 printf ("@code{INTEGER(KIND=%d)}, @code{REAL(KIND=%d)}, or @code{COMPLEX(KIND=%d)}",
837 (kind - '0'), (kind - '0'), (kind - '0'));
841 assert ("N1" == NULL);
850 printf ("@code{INTEGER} or @code{REAL}");
853 case '1': case '2': case '3': case '4': case '5':
854 case '6': case '7': case '8': case '9':
855 printf ("@code{INTEGER(KIND=%d)} or @code{REAL(KIND=%d)}",
856 (kind - '0'), (kind - '0'));
860 printf ("@code{INTEGER} or @code{REAL} with same @samp{KIND=} value as for @var{%s}",
861 argument_name_string (imp, 0));
865 assert ("Sa" == NULL);
871 printf ("@samp{*@var{label}}, where @var{label} is the label\n\
872 of an executable statement");
876 printf ("Signal handler (@code{INTEGER FUNCTION} or @code{SUBROUTINE})\n\
877 or dummy/global @code{INTEGER(KIND=1)} scalar");
881 assert ("arg type?" == NULL);
891 printf ("; OPTIONAL (must be omitted if @var{%s} is @code{COMPLEX})",
892 argument_name_string (imp, argno-1));
896 printf ("; OPTIONAL");
900 printf ("; OPTIONAL");
908 printf ("; at least two such arguments must be provided");
912 assert ("optionality!" == NULL);
928 assert (extra != '\0');
929 printf ("; DIMENSION(%d)", elements);
938 printf ("; INTENT(IN)");
945 printf ("; cannot be a constant or expression");
949 printf ("; INTENT(OUT)");
953 printf ("; INTENT(INOUT)");
962 Intrinsic groups: ");
965 case FFEINTRIN_familyF77:
966 printf ("(standard FORTRAN 77).");
969 case FFEINTRIN_familyGNU:
970 printf ("@code{gnu}.");
973 case FFEINTRIN_familyASC:
974 printf ("@code{f2c}, @code{f90}.");
977 case FFEINTRIN_familyMIL:
978 printf ("@code{mil}, @code{f90}, @code{vxt}.");
981 case FFEINTRIN_familyF90:
982 printf ("@code{f90}.");
985 case FFEINTRIN_familyVXT:
986 printf ("@code{vxt}.");
989 case FFEINTRIN_familyFVZ:
990 printf ("@code{f2c}, @code{vxt}.");
993 case FFEINTRIN_familyF2C:
994 printf ("@code{f2c}.");
997 case FFEINTRIN_familyF2U:
998 printf ("@code{unix}.");
1001 case FFEINTRIN_familyBADU77:
1002 printf ("@code{badu77}.");
1006 assert ("bad family" == NULL);
1007 printf ("@code{???}.");
1012 if (descriptions[imp] != NULL)
1014 const char *c = descriptions[imp];
1021 while (c[0] != '\0')
1023 if (c[0] == '@' && ISDIGIT (c[1]))
1025 int argno = c[1] - '0';
1028 while (ISDIGIT (c[0]))
1030 argno = 10 * argno + (c[0] - '0');
1033 assert (c[0] == '@');
1035 printf ("%s", name_uc);
1037 printf ("%s", argument_name_string (imp, argno - 1));
1040 fputc (c[0], stdout);
1049 argument_info_ptr (ffeintrinImp imp, int argno)
1051 const char *c = imps[imp].control;
1052 static char arginfos[8][32];
1053 static int argx = 0;
1063 while ((c[0] != ',') && (c[0] != '\0'))
1073 for (; (c[0] != '=') && (c[0] != '\0'); ++c)
1076 assert (c[0] == '=');
1078 for (i = 0, ++c; (c[0] != ',') && (c[0] != '\0'); ++c, ++i)
1079 arginfos[argx][i] = c[0];
1081 arginfos[argx][i] = '\0';
1083 c = &arginfos[argx][0];
1085 if (((size_t) argx) >= ARRAY_SIZE (arginfos))
1092 argument_info_string (ffeintrinImp imp, int argno)
1096 p = argument_info_ptr (imp, argno);
1102 argument_name_ptr (ffeintrinImp imp, int argno)
1104 const char *c = imps[imp].control;
1105 static char argnames[8][32];
1106 static int argx = 0;
1116 while ((c[0] != ',') && (c[0] != '\0'))
1126 for (i = 0; (c[0] != '=') && (c[0] != '\0'); ++c, ++i)
1127 argnames[argx][i] = c[0];
1129 assert (c[0] == '=');
1130 argnames[argx][i] = '\0';
1132 c = &argnames[argx][0];
1134 if (((size_t) argx) >= ARRAY_SIZE (argnames))
1141 argument_name_string (ffeintrinImp imp, int argno)
1145 p = argument_name_ptr (imp, argno);
1151 print_type_string (const char *c)
1159 assert ((kind == '1') || (kind == '='));
1161 printf ("@code{CHARACTER*1}");
1164 assert (c[2] == '*');
1165 printf ("@code{CHARACTER*(*)}");
1173 printf ("@code{COMPLEX}");
1176 case '1': case '2': case '3': case '4': case '5':
1177 case '6': case '7': case '8': case '9':
1178 printf ("@code{COMPLEX(KIND=%d)}", (kind - '0'));
1182 assert ("Ca" == NULL);
1191 printf ("@code{INTEGER}");
1194 case '1': case '2': case '3': case '4': case '5':
1195 case '6': case '7': case '8': case '9':
1196 printf ("@code{INTEGER(KIND=%d)}", (kind - '0'));
1200 assert ("Ia" == NULL);
1209 printf ("@code{LOGICAL}");
1212 case '1': case '2': case '3': case '4': case '5':
1213 case '6': case '7': case '8': case '9':
1214 printf ("@code{LOGICAL(KIND=%d)}", (kind - '0'));
1218 assert ("La" == NULL);
1227 printf ("@code{REAL}");
1230 case '1': case '2': case '3': case '4': case '5':
1231 case '6': case '7': case '8': case '9':
1232 printf ("@code{REAL(KIND=%d)}", (kind - '0'));
1236 printf ("@code{REAL}");
1240 assert ("Ra" == NULL);
1249 printf ("@code{INTEGER} or @code{LOGICAL}");
1252 case '1': case '2': case '3': case '4': case '5':
1253 case '6': case '7': case '8': case '9':
1254 printf ("@code{INTEGER(KIND=%d)} or @code{LOGICAL(KIND=%d)}",
1255 (kind - '0'), (kind - '0'));
1259 assert ("Ba" == NULL);
1268 printf ("@code{REAL} or @code{COMPLEX}");
1271 case '1': case '2': case '3': case '4': case '5':
1272 case '6': case '7': case '8': case '9':
1273 printf ("@code{REAL(KIND=%d)} or @code{COMPLEX(KIND=%d)}",
1274 (kind - '0'), (kind - '0'));
1278 assert ("Fa" == NULL);
1287 printf ("@code{INTEGER}, @code{REAL}, or @code{COMPLEX}");
1290 case '1': case '2': case '3': case '4': case '5':
1291 case '6': case '7': case '8': case '9':
1292 printf ("@code{INTEGER(KIND=%d)}, @code{REAL(KIND=%d)}, or @code{COMPLEX(KIND=%d)}",
1293 (kind - '0'), (kind - '0'), (kind - '0'));
1297 assert ("N1" == NULL);
1306 printf ("@code{INTEGER} or @code{REAL}");
1309 case '1': case '2': case '3': case '4': case '5':
1310 case '6': case '7': case '8': case '9':
1311 printf ("@code{INTEGER(KIND=%d)} or @code{REAL(KIND=%d)}",
1312 (kind - '0'), (kind - '0'));
1316 assert ("Sa" == NULL);
1322 assert ("type?" == NULL);