PLEX86  x86- Virtual Machine (VM) Program
 CVS  |  Mailing List  |  Download  |  Newsgroups

Where should the type information be 159


Your Ad Here

Your Ad Here

John R. Levine

Locate mode I-O, where operations are directly out of the I-O buffer instead of copying to-from user memory, is an interesting feature. I don't know if it is IBMish, but IBM buttembly programs tend to do it.

GOTO with label variables, instead of switch-case, but them many people don't seem to like switch-case very much.

Well, the conversions between CHAR and numeric types usually aren't accidental, but some of the other rules can be confusing, I agree.

I did one when I was in high school, something like:

DCL (A,B,C,D,E) CHAR(20); A='1'; B=' 100'; C='2'; DO D=A TO B BY C; E=SQRT(D); PUT SKIP LIST(D,D); END;

It took a few tries to get the right number of spaces in B, as the DO comparison is a CHAR compare. SQRT is done in double precision floating point.

Part of it is that constants have the type they are written in, including precision. Not that I know of a better way, but combined with the rules that, as you say, make sense in isolation, and especially when applied to variables, the results on constants can be confusing. My favorite, I believe from the manual, is

25+1-3 which gives 5.33333333333333 as the rules for divide are the ones that are especially sensitive to the precision of the operands.

Where should the type information be 160
True enough, John, but it isn't as if you are warned that you may not know what you are doing, tt...

Being able to specify precision and scale is nice, but programmers rarely know exactly the precision needed. Also, being used to other languages with limited choices, many continue to use those choices.

I learned Fortran from the reference manual, and I believe PL-I, also. Coming from Fortran with no conversion between character and numeric types at all (internal WRITE came a little later, and there was FIO999), that, and many other PL-I features were so nice to have.

-- glen



Your Ad Here

List | Previous | Next

Where should the type information be 160

Alt Folklore Computers from Newsgroups

The #1 Usenet Provider on the Internet

fun with PLI, was Where should the type information be