• Any time you had to retain the data after the program is closed, or another program has to be able to manipulate the data. Those are the two cases I can think of where it's most pressing.
  • Variables will only retain their values while your program (or environment) is running. Imagine how useless it would be if WORD stored your text in variables. Another reason to use files is for saving memory. Variables take up memory, files just take up disk space (and arguably virtual memory access speed). Hope this helps. Tom

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy