Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!hpda!fortune!wdl1!jme
From: jme@wdl1.UUCP (Joseph M. Earley)
Newsgroups: net.lang.f77
Subject: internal read problems
Message-ID: <181@wdl1.UUCP>
Date: Mon, 19-Mar-84 16:53:34 EST
Article-I.D.: wdl1.181
Posted: Mon Mar 19 16:53:34 1984
Date-Received: Wed, 21-Mar-84 01:26:25 EST
Lines: 43

My 4.1 BSD documentation says that I can do an internal read.  The ANSI
standard says I can do an internal read.  So why does the following code
give me the following result?

	program test
	read ( unit='300 ', fmt='(bn,i4)', iostat=ierror ) ispeed
	if ( ierror .eq. 0 ) then
		write ( *, '(''ispeed = '',i6)' )  ispeed
	else
		write ( *, '(''ierror = '',i6)' )  ierror
	end if
	end

ierror =  20488


Why does the following change result in an error code so different from the 
first example?

	program test
	character buffer*4
	buffer = '300 '
	read ( unit=buffer, fmt='(bn,i4)', iostat=ierror ) ispeed
	if ( ierror .eq. 0 ) then
		write ( *, '(''ispeed = '',i6)' )  ispeed
	else
		write ( *, '(''ierror = '',i6)' )  ierror
	end if
	end

ierror =  30616




Thanks for any insite that may be provided.  Send your responses to me at...;
nah, what the heck, post your responses to net.lang.f77.  I feel like being
made a fool of in public.

Joe Earley, Ford Aerospace, Palo Alto

ARPA    jme@ford-wdl1
UUCP    ...!fortune!wdl1!jme