Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > reading data
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 2nd May 11:49
robin
External User
 
Posts: 1
Default reading data



From: "David Frank" <dave_frank@hotmail.com>, RoadRunner - Central Florida
Date: Fri, 28 Nov 2003 13:41:59 GMT

<<<< from comp.lang.fortran topic "reading data" >>>>>

THis is a PL/I newsgroup, not Fortran.


..
PL/I offers a much more convenient approach -- it reads the whole matrix
and allows you to interpret such characters as A and B etc simply.
..
declare X float (m, n), onchar builtin;
on conversion begin;
select (onchar); /* choose depending on the letter character. */
when ('A') onchar = '0'; /* substitute any desired value */
when ('B') onchar = '0';
otherwise /* do whatever you want */ ;
end;
end;
get (X); .. ..
  Reply With Quote


  sponsored links


2 22nd May 09:33
david frank
External User
 
Posts: 1
Default reading data



You posted some statements that are gibberish standing by themselves,
why dont you post a complete program thats equivalent to above?

ANS.. Because you know PL/I has inferior error support processing
with NO ERR= specifying what error action to take for each read,
instead it has some ineffective catch-all thats
useless in the problem posed above.
  Reply With Quote


  sponsored links


3 22nd May 09:33
lindahl
External User
 
Posts: 1
Default reading data


Robin,

Please watch what the Newsgroups: line says -- Dave often cross-posts
to both groups, and that's the case in this posting. When he does so,
please don't answer in both groups, or just ignore him completely --
there's no reasoning with the man.

-- greg
  Reply With Quote
4 22nd May 09:33
robin
External User
 
Posts: 1
Default reading data


"David Frank" <dave_frank@hotmail.com> writes: >


Just add a PROC statement and an END statement and
run it on your PL/I compiler.

PL/I has superior error-handling, as you can see from
the simple SELECT clause.

Note also the simple statement to read the data,
viz, GET (X);
whereas your Fortran version needs 7 statements including
a loop.
  Reply With Quote
5 22nd May 09:33
lindahl
External User
 
Posts: 1
Default reading data


Robin,

Dave's message was posted only to comp.lang.pl1 -- why did you
cross-post your answer? If you find him annoying, please ignore him.
Whatever you do, creating new crossposted threads is NOT a clever
idea.

-- greg
  Reply With Quote
6 22nd May 09:34
david frank
External User
 
Posts: 1
Default reading data


If you were observant you would see that it was Robin that ADDED
comp.lang.fortran in his response to my comp.lang.pl1 topic.
I am observing a resolution not to be the one that creates NEW topics
cross-posted.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666