Definitely a mistake. What you are doing is writing code in your main method, which you oughtn’t, even though you see it in many books. You correct that error by moving the code out of the main method.You can probably think of a better name than go(), however. Now you put all the code you had there inside the go() method.Chuck Geiger wrote: . . . Cannot make a static reference to the non-static field Data.var (this was why my original post had "static" on the first line. . . .
I missed out rainfall. It should read Sorry!I got it wrong when I wrote: . . .
Chuck Geiger wrote:I am writing a program that is much less predictable. The data file being read in could contain any number of rows AND any number of columns (separated by commas, *.csv fashion). Each column will always have the same kind of information (like yours) BUT the values in any of those positions can be any kind of data (numerical or text). That's why I am preserving a string version of each data value, so that I can process it elsewhere to determine what kind of data it is and what other statistical tests it's suited for. The ones that are numbers will be stored as numbers as well. When I need strings, such as for output purposes, I'll have the .valStrValue field ready for that.
Thanks again for your patience.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Yes, we are at cross purposes. I am not sure what to recommend. I know you can get programs which are designed to read .csv files, and we have an FAQ which suggests programs for all sorts of file formats.Chuck Geiger wrote: . . . we are talking at cross-purposes a bit. Your model is based on the assumption that the data being read in will always be in the same format: name, latitude, longitude, etc. I am writing a program that is much less predictable. . . .
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |