🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sequent
Article #904

Problem reading float with scanf

#904
From: Luis Barriga
Date: Fri, 16 Feb 1990 18:03
28 lines
1442 bytes
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     			|
________________________________________________________________________|
Technical Details
Message-ID: <LUIS.90Feb16190324@chinook.octopus.tds.kth.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!sunic!draken!luis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!sunic!draken!luis
From: luis@octopus.tds.kth.se (Luis Barriga)
Newsgroups: comp.sys.sequent
Subject: Problem reading float with scanf
Message-ID: <LUIS.90Feb16190324@chinook.octopus.tds.kth.se>
Date: 16 Feb 90 18:03:25 GMT
Sender: news@nada.kth.se
Organization: The Royal Inst. of Technology (KTH), Stockholm, SWEDEN.
Lines: 28