| PLEX86 | ||
Where should the type information be 157Where 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: proc options... Where should the type information be 161 Couldn't have influence if the first exposure was 1978. I don't remember it ever shipping. PL-I never got into the software notebooks so... John R. Levine fun with PLI, was Where should the type information be You do? It's not in my ANSI PL-I standard. If we get to add vendor... What flow of control do you want? besides IF, CALL and ON-SIGNAL, you have SELECT (like C's 'switch' without the 'break' problem) and various flavors of DO that are a superset of C's 'do' and 'for' statements, and of course, nasty old GOTO. The condition handling is one of the most powerful features of PL-I, and the one most missed in C. The idea is that the compiler will provide a default handler for error conditions, which the C programmer has to check for manually. Therefore, if the programmer forgets to check and an error occurs, the usual action is an error message and the program terminates, unlike C where the usual action is to continue as if nothing happened. Where should the type information be 159 John R. Levine Locate mode I-O, where operations are directly out of the I-O buffer instead of copying to-from user... Then you add the feature that the programmer can selective enable-disable error checking on a statement, block, or program basis. For example, if you were writing a random number generator where overflow is expected, you could just disable overflow checking for that procedure or selected statements within it. Finally, the programmer can override the compiler's default condition handling and any level, and replace it with his own logic. If you're "reading" a numeric field that the user enters on an HTML form, rather than manually scanning and de-editing the field yourself, you can specify what action you take if the CONVERSION condition is raised (invalid numeric data), then let the compiler do the conversion and inform you if an error occurred. You also have the option of letting the error "percolate". Maybe it's something you can't handle, so you bump it up and let the next level terminate the thread, etc. Wow, you're right! I agree this is confusing. On the other hand, it is extremely powerful. Certainly no one would ever be taught to code like that, presumably, if you wrote it, you had a reason for it, and you should know what it's going to do. C has fewer data types, but still does stuff like this, and programmers still get surprised by it. This is too bad. It should have led to more portable code than C, because you don't have to worry about how big an int or a long is on a particular machine. On the other hand, if you wanted to be more C-like you could have dropped the precision and just said FIXED BINARY, which gives you the equivalent of int -- "just give me whatever the standard size is on this machine". Where should the type information be 162 Brian Inglis PC-DOS and all of its derivatives, which includes Windoze. Early on Microsoft(R... I don't think this is true any more. Most PL-I programmers know at least most of the language. A few years ago, I would have said I knew it all, but the more I know, the more I find out I don't know.
|
||||
fun with PLI, was Where should the type information be Alt Folklore Computers from Newsgroups The #1 Usenet Provider on the Internet
|
||||