Msg: 5004 *Conference*

03-12-94 13:36:51

From: CARROLL LEWIS

To : ALL

Subj: 4E-13

 Ran into something interesting the other day.
 After writing a small program to convert inches to feet,inches,and fractions;
some even inch entries resulted in a display of "4E-13" as the FRACTION.
 
  10 CLS:INPUT"TOTAL INCHES";L
  20 TF=INT(L/12)
  30 TI=LMOD12
  40 TR=(((L/12)-TF)*12)-TI
  50 PRINT"FEET",TF
  60 PRINT"INCHES",TI
  70 PRINT"FRACTIONS",TR
  80 INPUTA$:GOTO10
 
   Entering 50,80,77 all result in 4E-13 at the fraction line. (my sales staff
records wall lenght as 125.25 ect)
 
  HOW did letters end up in a numeric variable?
  
  The resolve became:
 
   70 IF(TF*12)+TI<>L THEN PRINT "FRACTION",TR ELSEPRINT"NO FRACTION"
 
 -CARROLL-