Is the text stored in program memory as a string literal or stored in SRAM?
Yes, it is. Both. Use the F() macro to keep the string out of SRAM.
Also, is it better to declare global variables rather than have functions create and free up the memory to avoid fragmentation?
Not generally. Functions create variables on the stack, which is cleaned up when the function ends. Dynamic allocation, like Strings, happens in the heap, and can cause fragmentation of the heap.
And finely, is there a way to use an array of chars rather than a String object with functions such as FileType.name(); from the SD library?
Of course. The name() function returns a pointer to an array of chars that is NULL terminated. Specifically, what do you want to do with the name?
Or should I just initialize a String as a global variable with a reserved size?
This is what you should do with String:
Thank You, that answered all my questions. I had never seen the F() macro before. I did some quick research on the web and discovered that the 2000+ bytes of HTML that the create config page function was loading up memory horribly. Not to mention several other page creation functions. That will be remedied. And the fact that (god help me, this is C so I should have known) the name function returned a pointer to a string not the string it's self. And the
response is exactly what I was trying to achieve. Armed with this new information I can get everything back on track without a complete rewrite.
One last question (for now), is there a complete reference to the Arduino programming language? Something a little more complete than the reference file that comes with the compiler download? If I had known about the F() macro I would not have had the problem in the first place. The last time I did any programming was back in the late 80's in the structured programming days running DOS 6 using a Pascal compiler.
Thanks again for the help....