-
I quote (cut&paste) from my current programming handbook:
INPUT #(openfilenumber) &variablename { ,&variablename, &variablename,
etc }
Comma?
Ok, so it is in the file you mention, BUT they still send out the 03 programming handbook which is HOPELESSLY out of date with the current PRT program
PLEASE can somebody pull it all together.
I NEED a correct full reference. It is costing me HOURS.
Rant over. (hair falling as I speak)
I'll see if it does the trick next time shopbot stops.
-
Aren't you looking at WRITING in the file instead of reading in a value?
Check out 'C:\Program Files\ShopBot\Developer Tools\Docs\SbW_ShopBotProgrammingStatements.txt 9;
---------------------------------------------------------------------------------------------------------
INPUT, INPUT #
Works like it has, except that INPUT calls up a message box for user input that provides OK/Cancel Buttons. Cancel removes the box and ends the program. OK enters the values in the box. If the box is empty and only one variable is expected, it treats variable as empty string and continues. If more than one variable is expected, an empty box is the same as a cancel. INPUT #_ reads in variables from a file as strings or numbers.
INPUT "Optional Text Message" &variable1, &nextvariable, &and_so_on
INPUT #{number}, &variable1, &nextvariable, &and_so_on
---------------------------------------------------------------------------------------------------------
WRITE
(note comma vs semicolon in the syntax below ... this is all pretty much the same as DOS version)
Write #?, (data list, items separated by comma) ... This is the standard way to use Write function. Separate each data item by a comma and they will be evaluated and separated by commas in the output file. A semicolon as the last character will surpress the line feed in the file being printed to.
Write #?; (data list; items separated by semicolons) ... This is an alternative Write function in which all spacing characters are surpressed except those explicitly supplied in data list. A semicolon as the last character will surpress the line feed in the file being printed to. For example, to generate: &myVar = 23.5 in the generated file you would use:
&someVar = 23.5
Write #1; "&myVar = "; &someVar
Or if you wanted to generate: M2, 23.5, 23.5 you would use
&someVar = 23.5
Write #1; "M2, "; &someVar; ", "; &someVar
Thus, the Write #?; version of the Statement gives the most explicit control of punctuation in the output file. Alternatively, the last statement could have been produced more simply with:
&someVar = 23.5
Write #1, "M2", &someVar, &someVar
** Currently can not have a comma inside quotes to write with Write #?, but you can accomplish this using the more explicit controls of Write #1; ...
-------------------------------------------------------------------------------------------------------
I find it this doc most of the latest stuff... don't hesitate to get in touch with SB support for help.
-
Paco,
I'm looking to read from the file in this instance. Apparently you open the file with an OUTPUT flag if you want to write to it and open a file with an INPUT flag if you read from it. This is the reverse of what I am used to in autolisp.
R.
PS Please can we all put pressure on shopbot for a unified, up to date, CLEAR, and comprehensive programming manual.
-
Hey Ralph,
Dick is correct...we try to keep the most current changes to the Programming commands in that SbW_ShopBotProgrammingStatements document. As soon as we get some time we'll redo the programming manual...it's definately on the todo list...but until then that doc is the best place to look. Hopefully I'll cover some of these issues in the next couple of Bill's Corner articles as well.
If you find changes that are not in that doc it would be a big help if you would email them to me and I'll make sure they get put in.
Bill
-
Bill,
It's been on the todo list for at least a Year now. (we've had this conversation before...). Could I suggest you include the document as a version ammendment *alongside* the programming handbook in both the control software and the download section of the web site.
Does it mean, by the way, that if I write a file to the current standard, it will not work if I re-instate 3.1.14? (my last favourite)
Thanks,
R.
-
OK, it works now, thanks to Dicks comma..
r.
-
Ralph,
All the programming commands should work the same in 3.1.14 as they do now, and except for the new commands like PLAY and some changes to the way text is handled and message boxes are displayed they should work the same way as they did in the DOS software.
That said, 3.1.14 was pretty early in the evolution of the Windows software and my guess is that there may be some commands that may not have worked correctly back then, especially in Preview mode. If so it's not from changes to the commands but from bugs in an early version of the software.
Bill