ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
RE: [ECS] Reading a text file into a number
A.J. Griglak
Tue, 7 Mar 2000 23:12:56 -0500

OK... I've finally got around to trying this out.  On my system, it throws
everything into an endless loop.  It seems that input-char is always
<nul>... Does this mean that it's not actually reading the text file?

-=A.J.

-----Original Message-----
From: peter kraus [mailto:pkraus@optonline.net]
Sent: Sunday, March 05, 2000 5:37 AM
To: ecs-list@netbloc.com
Subject: RE: [ECS] Reading a text file into a number


try this:

  define the input_char as type character
  define the cur_temp as type file pointing to cur_temp.txt
  define input_string as type text

do number-a set 0
  while  input_char     is not    none
  do    input_char       set        cur_temp
  if      input_char        is GE   0
  and  input_char       is LE    9
and number-a is not 0
then number-a multiple 10
if input_char is 1
then number-a add 1
else if input_char is 2
then number-a add 2
else if input_char is 3
then number-a add 3
else if input_char is 4
then number-a add 4
else if input_char is 5
then number-a add 5
else if input_char is 6
then number-a add 6
else if input_char is 7
then number-a add 7
else if input_char is 8
then number-a add 8
else if input_char is 9
then number-a add 9
  endwhile
do  cur_temp#   set   number-a



  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.