Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!lll-winken!lll-lcc!ames!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclcdb!cdb From: cdb@hpclcdb.HP.COM (Carl Burch) Newsgroups: comp.sys.hp Subject: Re: terminfo problems (Was: 300/800 Incompatibilities) Message-ID: <1340032@hpclcdb.HP.COM> Date: 12 Sep 88 19:52:57 GMT Article-I.D.: hpclcdb.1340032 References: <1626@sjuvax.UUCP> Organization: HP ITG/ISO Computer Language Lab Lines: 67 >Problem 1. >I worked at Goddard Space Flight Center this past summer converting Fortran >code from an HP A900 to 9000 series workstations. Since both the 835 and >the 3XX machines run HP-UX, they are supposed to be source-code compatible. >They aren't. There is great difficulty in calling C routines from Fortran >compiled on the 835. Generically, whoever told you the machines were "source code compatible" was telling you the truth, but didn't tell you what that meant - that the same program in a given language will compile and run the same. ------------------- Multi-language programming is implementation-dependent on anybody's machine. You always have to emulate the calling language's calling sequence in the callee (or, less often, vice versa). You presumably ran into a case where the conventions (probably in Fortran) differ between the two implementations. Calling C from Fortran isn't harder on the S800, only different. You don't say, but the main case I've seen is with regard to character arguments. Fortran/S300 passes character items by a split descriptor (the address in the usual parameter list and the length tacked onto the end of the list). Fortran/S800 uses inline descriptors by default (address immediately followed by the length word). The length word is required in FORTRAN 77 to implement the CHARACTER*(*) feature. You might notice the word "default" above. We observed problems like yours about a year ago and consequentially developed two compiler directives that let you control what Fortran/S800 does in regard to character variables : $HP9000 CHARS to make the S800 pass character arguments like the S300 and $FTN3000_66 CHARS to dispense with the length word altogether (which some Fortran 66 programs expect). These directives were released to customers this past summer. If you'll send me e-mail, I'll see if I can help with any other differences you might have found. >There are even problems compiling the code. Compiler >directives are different on the two machines. Has anyone else experienced >these problems? Yes, most notably our management. ;-) That's why the top priority for both the Fortran compiler teams for the last year has been converging these differences. If you'll e-mail me the directives you were trying to use, I'll get their current convergence status for you. One of the features the S800 (and soon the S300) compiler has to handle the larger number of inline directives on the S800 is the +Q command line option, which pulls in ahead of the files being compiled. If has the directives you need to control a global feature of the language (e.g., $HP9000 CHARS) you can maintain the same source across both S300 and S800 without having to edit in the directives to keep compatibility with your C source. >Problem 2. >The Cdb debugger on both the 318 and the 350 does not handle the 25' monitors >correctly (term=300h). It scrolls right of the screen in window mode. This >is particularly frustrating since we are using HP software on HP machines. >Arrrgh! I'm not the right person to answer this problem, but I'll pass this along to the people who are. >Any feedback/advice is appreciated. Any feedback/advice is appreciated by us, too - we're here to solve your problems, not just to read notes. :-) Carl Burch HP Fortran Lab hpda%cdb@hplabs.HP.COM {the world}!hplabs!hpda!cdb