TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: STEVEN DYCK
from: KURT KUZBA
date: 1998-05-13 06:41:00
subject: header files

SD>   - program asks user to input a number
SD>   - program goes to This_Program
SD>     (the program that I tried to stick in header file)
SD>   - User inputs a letter/number
SD>   - This_Program screens out all but numbers
SD>   - Saves the input as ch[i];
SD>   - keeps getting inputs until carriage return is pressed
SD>   - adds up the number (so it becomes one number,
SD>     but all the numbers in their correct decimal place)
SD>   - This_Program ends and goes back to the mother program,
SD>     carrying the complete number with it
   You don't want to use the header file, then.
   What you need to do is have the program which performs the
   input routine create a config file, or a data file, or
   whatever you want to call it. Then your other programs will
   use that file as their data source.
   You could just make the input routine a part of each program
   for which it is required, and have it read the value from
   the file, if the file exists, and then allow the user to
   add to the number, edit the number, enter a new number, or
   just continue with the number as it is given in the file.
   You don't require the use of an array, either, since you are
   using a running total. You can just use one variable to keep
   the present total, and another for the new input. You might
   also allow for the use of negative numbers, I suppose, if
   they are desired, if only to remove numbers from the total.
> ] You're trying to make me paranoid, but I'm on to your tricks
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.