1k1mgm@kuhub.cc.ukans.edu (Christopher Gunn) (02/03/91)
Recent discussion of equivalencing character variables to numeric variables (and problems resulting thereof) brought to mind a nightmare situation some of us faced back in the Dark Ages with old GE (later Honeywell) 600/6000/DPS monstrosities with 36-bit words and a '50s-style IBM 704 underlying architecture. 'Native' character set was 6-bit "G"BCD, almost but not quite IBM BCD ("G" meant "GE-modified") packed 6-6-6-6-6-6 bits in word. But upper/ lower case, telecommunications, etc., caught up with these dinosaurs and they had to accomodate 128-character code schemes. I think that there were at least two ways to do this. Default 'internal' method was 7-bit ASCII in 8-bit chunks dropped in 9-bit slots in words, i.e., 1-1-7-1-1-7-1-1-7-1-1-7 bits. HOWEVER, if you read from an externally- created tape and didn't get the JCL just right, you could get 1-7-1-7-1-7-1-7-1-3 / 4-1-7-1-7-1-7-1-7 etc. And I suspect you could also wind up with EBCDIC in 8-8-8-8-4 / 4-8-8-8-8 or 1-8-1-8 etc., forms. Needless to say, questions of portability DID NOT ARISE in such an environment, and I recall that one main complaint among us Honeywell sufferers was that Fortran didn't allow us to declare (and equivalence) character structures _of each flavor_ so that a program could figure out what was going on and use the right one. Now a question: I recall being told in the early '80s, when VAXes and F77 started turning up on campus, that the reason you couldn't/shouldn't equivalence F77 char strings to numeric variables was that whereas F66 Hollerith data could usually be assumed to be bare packed char codes (albeit sometimes packed weirdly, as above), F77 strings could be implemented in a Pascalish (count)-char-char-char... way or in more complicated descriptor form. Hence, inum(2) might contain chars 5..8, 3..6 or 1..4, or something altogether weird. Anyone know details of schemes of this sort? It's obviously not a red-hot issue; I was just somewhat curious. Christopher Gunn Molecular Graphics and Modeling Lab SPAN--KUPHSX::GUNN Department of Medicinal Chemistry, Malott Hall 913-864-4428 or -4495 University of Kansas, Lawrence, KS 66045