Re: Alternative COBOL "telco" source program
From: David Frank (dave_frank_at_hotmail.com)
Date: 05/28/04
- Next message: Michael Mattias: "Re: Alternative COBOL "telco" source program"
- Previous message: docdwarf_at_panix.com: "Re: OT: big whoops"
- In reply to: L Russ: "Re: Alternative COBOL "telco" source program"
- Next in thread: L Russ: "Re: Alternative COBOL "telco" source program"
- Reply: L Russ: "Re: Alternative COBOL "telco" source program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 May 2004 08:42:43 GMT
"L Russ" <lruss@superlink.net> wrote in message
news:cfaeadf3.0405271151.20c59a4@posting.google.com...
> robin <robin_v@bigpond.mapson.com> wrote in message
> news:<Iadtc.12799$L.1063@news-server.bigpond.net.au>...
>> From: "Michael Mattias" <michael.mattias@gte.net>, SBC
>> http://yahoo.sbc.com
>> Date: Wed, 26 May 2004 12:09:48 GMT
>> .
>> | Some of these "can'ts" are so incredibly banal...
>> .
>> They all are.
>
> They are all worse, much worse, than banal.
>
>> .
>> | e.g., # 18 "CANT find last
>> | word index in trailing blank text using a loop <= 3 statements."
>> .
>> Not only can this be done in PL/I,
>> it can be done by a beginner.
>> Furthermore, it can be done in PL/I in one statement.
>
> But if you do it in one statement, then it's not in a loop, and CAN'T
> 18 clearly states that you should use a loop, with at most 3
> statements, implying that using a loop (with three statements or less)
> is really the important thing when you do this task. Even if the
> language you use doesn't require that you do it that way.
>
> Here's my version using C++, no loop. Another FORTRAN CAN'T. Big
> deal.
Wanna bet?
> And yes, string and iostream are part of the C++ standard, so it's not
> like anyone can't duplicate this code if you've got a conformant
> compiler.
>
> #include <string>
> #include <iostream>
> int main() {
> const std::string s = "The quick brown fox jumps over the lazy dog's
> back. ";
> std::cout << s.substr(0, s.find_last_not_of(" ")+1) << std::endl;
> return 0;
> }
>
IMO, horrific syntax, but thats nothing new for C++ statements is it?
and its sure not apparent to me that above outputs 2 lines, does it?
- Next message: Michael Mattias: "Re: Alternative COBOL "telco" source program"
- Previous message: docdwarf_at_panix.com: "Re: OT: big whoops"
- In reply to: L Russ: "Re: Alternative COBOL "telco" source program"
- Next in thread: L Russ: "Re: Alternative COBOL "telco" source program"
- Reply: L Russ: "Re: Alternative COBOL "telco" source program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|