TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Francois Thunus
from: Murray Lesser
date: 1999-01-13 13:05:00
subject: Pl/I

From a message dated 01-12-99, Francois Thunus to Murray Lesser:

FT>11 Jan 99 06:33, Murray Lesser wrote to Eddy Thilleman:

 ML> *process langlvl(saa2), limits(extname(31)), libs, not('^');
 ML>  toupper: proc(infile) options (main noexecops);
 ML>     dcl infile char(100) var;
 ML>     dcl translate builtin;
 ML>     dcl (From value('abcdefghijklmnopqrstuvwxyz'),
 ML>          To value('ABCDEFGHIJKLMNOPQRSTUVWXYZ')) char(26);
 ML>     display (translate(infile,to,from));
 ML>   end toupper;

 ML>     I leave it as an exercise for the reader to write the equivalent in
 ML> Pascal :-).

FT>Borland Pascal:
  >upcase();
  >:-)

Thanks, Francois--

    You have demonstrated the major problem with teaching languages: no
input, no output :-).

    Seriously, I was trying to show Eddy what a complete (albeit
trivial) PL/I program looked like.  If you name the source file
containing my demo program TOUPPER.PLI, compile and link it, and then
key in the command line: "toupper This is a test" (no quotes), you will
get back: "THIS IS A TEST" (without quotes) displayed on your screen. As
should be obvious, this process (as written) accepts input string
parameters having lengths up to 100 characters.

    Somehow, I have the feeling that your example won't even compile,
let alone run :-(.

    Regards,

        --Murray

___
 * MR/2 2.25 #120 * Fidonet is almost like having a social life

--- Maximus/2 2.02
* Origin: OS/2 Shareware BBS, telnet://bbs.os2bbs.com (1:109/347)
SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 635/444 506 728 639/252
SEEN-BY: 670/218
@PATH: 109/347 104 8 13/25 270/101 12/12 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.