| Author |
Can Java do a <Read x,y Data 1,2> like in old DOS?
|
Ken Perrine
Greenhorn
Joined: Oct 25, 2012
Posts: 4
|
|
First, I like the rules required for this forum!
I am new to Java.
I am re-writing some very old QBasic DOS programs to Java (and have programmed other things in VB6). In the older DOS versions you could use a READ statement followed by a matching number of DATA text/FP/integers rather than reading in from a file. I couldn't figure out how to do it in VB6, and now can't figure it out in JAVA. For some routines where I'm reading in an array of, say, x(5,4) numbers, it would be easier to imbed in the program rather than writing a text file and having the program read the file.
Can one do it in Java? How, or an brief example?
Thanks,
And have an Old Moosedrool beer (Bozeman microbrewery) on me if you know,
Ken
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8264
|
|
Welcome to the JavaRanch. Are you asking how to create a literal array?
That's an array with two rows and three columns.
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
Ken Perrine
Greenhorn
Joined: Oct 25, 2012
Posts: 4
|
|
|
That is the fastest response I have ever received! And the most concise, vs. my logorrhea... Yes, it is what I was looking for, and much easier than expected. Thanks.
|
 |
 |
|
|
subject: Can Java do a <Read x,y Data 1,2> like in old DOS?
|
|
|