View Single Post
  #7   Spotlight this post!  
Unread 14-02-2012, 07:50
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

My guess is that you are exceeding the character limit for the line of the Driver Station and it's getting truncated. That display does not line wrap, it truncates extra characters.

If you open Execute File, there are several VI's which do the actual processing of a file into arrays of lines and later arrays of arguments. I believe the first one is read_auto_file and the second is part of ExecuteCommand.

It's never explicitly defined how many arguments to expect. The interpreter passes all arguments to the command and lets each command deal with it - Some do, some don't.

For the actual breaking up into lines, it first breaks them up by newline into an array of lines, then FOR's through each item. If it's not a comment or blank line, it executes the command on that line. That VI breaks up the line into an array of strings separated by spaces. The first one is the command name, the rest are arguments. It finds the command with a matching name to the command called, and calls it with an array of arguments.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote