I'm trying to understand some very weird behavior I'm seeing in the INPUT # statement. I'm using v3.8.50 of the control software.
Here's a test program:
open "test.txt" for input as #1
input #1, &testVal
print "&testVal = ", &testVal
close #1
For the first run, the contents of "test.txt" is this:
String value
When you run it, you'll get:
&testVal = String value
However, if you change that file to read:
"String value"
The output from the print will be the same. The input code is stripping the quotes. Is this behavior on purpose? To me, this is improper function - the behavior isn't documented. Is this a known bug?
Next, change the file to read:
text-text
Instead of the output being "text-text" (no quotes), the program crashes with:
"Undefined Variable: TEXT (&testVal; 0]"
This tells me that for some insane reason, it not only thinks that "text" is a variable, but that it's trying to perform a math operation on it!
Changing the "-" to any math operator generates the same error.
Is this a known bug?
Ok, next up, if you attempt to read beyond the end of the file, You'll get a hard error = "Run-time error '62': Input past end of file". THIS knocks down the whole ShopBot Control program. The only window left is the SHopBot Preview window. This is for sure a bug - it shouldn't bring down the house on a simple error like that.
Thanks all.
(also, if someone could answer the question I posted on the ShopBot Control Software v3 board, I'd really appreciate it!)
g.