BL> Does a static array persist after the function has been called?
PE> Yes.
BL> How strange. You call a function, close the function, and the data
BL> stays... sort of like global data on demand. How do you get rid of it?
You can't.
BL> Why not make it global? That would obviate the need to pass pointers
BL> to pointers and save a step.
BL> How does it know one "names" from the next one?
PE> There's only the one. In that function, anyway.
BL> It's memory that stays clogging up the system after the use for it
BL> has gone, but can only be accessed by the function you're no longer
You might call the function again.
BL> using. Great idea. Has C got many like that? Why not just make it
BL> global?
Well, once you start using global variables you have to name them so that
no other module uses that same name. Declaring them static local means
that you can name them whatever you want. BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|