Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!microsoft!bobal From: bobal@microsoft.UUCP (Bob Allison) Newsgroups: comp.lang.fortran Subject: Re: dpANS Fortran 8x Summary: pretty long Message-ID: <6234@microsoft.UUCP> Date: 6 Jul 89 00:12:48 GMT References: <2724@elxsi.UUCP> <6105@microsoft.UUCP> <193@unmvax.unm.edu> Reply-To: bobal@microsoft.UUCP (Bob Allison) Distribution: usa Organization: Microsoft Corp., Redmond WA Lines: 78 In article <193@unmvax.unm.edu> brainerd@unmvax.unm.edu (Walt Brainerd) writes: >In article <6105@microsoft.UUCP>, bobal@microsoft.UUCP (Bob Allison) writes: >> In article <2724@elxsi.UUCP> uunet!elxsi!corbett (Bob Corbett) writes: >> > >> > [...] >> > INTEGER(64) :: entity-decl-list >> > [... but this solution is nasty since the parameter varies ...] >> It turns out this is easily solvable: the kind parameter may be a parameter >> (that is, a symbolic constant): >> >> INTEGER, PARAMETER :: MOST_INT_BITS = 64 >> INTEGER(MOST_INT_BITS) :: entity-decl-list >> >The request was for a user-defined type that does not involve structures. >What do parameters have to do with anything? > It was simply a way of solving his described problem; I do go on to say it doesn't provide a solution via the mechanism he would prefer: >> However, it doesn't allow you to define a type, merely a type kind. My >> personal resistance to that feature (contrary to Walt Brainerd's assertion >> that we're all morons who can't handle the concept) is that it doesn't mesh > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> well with the current rules of FORTRAN syntax: if we could define the first >> [...] >> >The evidence for my alleged implication is mounting! >(or maybe it's just me) but I don't understand what the first token of a >statement has to do with anything, either. What I think is being requested >is the ability to do something like this (all statements begin with >a keyword): > >TYPE LONGEST_INT >INTEGER(64) ! with or without a paramter >END TYPE LONGEST_INT > >and then be able to declare > >TYPE (LONGEST_INT) :: entity-decl-list > >Walt Brainerd Unicomp, Inc. brainerd@unmvax.cs.unm.edu Well, I thought the discussion was about how user-defined types should be able to be declared just like intrinsic types are, so that your last line would be: LONGEST_INT [[attribute-list] ::] entity-decl-list (which could potentially come out as: LONGEST_INT A,B,C which would be pretty tough to parse in the old source form) which was where my point about tokens was aimed. In the example you provide above, I am still somewhat unhappy, because it is impossible to decide if the line "INTEGER(64)..." has a syntax error or not until later in the game (I guess I'm assuming that the type may only have one entry if the entry is unnamed, etc.). Syntactically, this problem is very difficult to solve, and I don't think I've ever seen a proposal which fits well with current FORTRAN syntax conventions. I'd like to believe I've always been open to proposals in this area; I just don't believe I've ever seen one which fits given current syntax conventions. Also, I agree that Walt never explicitly called anyone a moron (after all, if he had I would have put it in quotes ;-); that was my personal interpretation of some comments he made in prior (and current) notes. Finally, let me second Walt's point about providing positive as well as negative comments on the draft during public review. It is as important to know what went right as it is to know what went wrong (it lets us know areas which should NOT be changed). Bob Allison uunet!microsoft!bobal