[comp.sys.sequent] Problem reading float with scanf

luis@octopus.tds.kth.se (Luis Barriga) (02/17/90)

Here is a problem discovered by a student.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#include <stdio.h>
 float h;
main()
{
  printf(" give step: ");
  scanf("%f",&h);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It loggs you out while readind a number starting with zero and point, i.e
"0.". All other numbers like .73737 .6464 123.45 1.2233 5.666 etc. are
read OK. Has anybody had this problem? 

P.S. I've tested this same program on a VAX and SUN and I was logged
out as well while giving a number 0.

P.P.S. I wanted to post this letter to all other concerned groups as
well but I had already sent it );-)
--
________________________________________________________________________|
   Luis Barriga			     The Royal Institute of Technology	|
				     Dep. Computer systems (TDS)	|
   e-address: luis@tds.kth.se	     S-100 44 Stockholm			|
				       SWEDEN     			|
________________________________________________________________________|

johnb@hpubvwa.HP.COM (John Blommers) (02/20/90)

This should not happen.

I tried it on an hp9000 model 835.
It parses, and a debug printf showed the scanf to work.
I don't see why you'd be logged of a system because of parsing problems.