View Single Post
  #7   Spotlight this post!  
Unread 05-02-2007, 23:46
kitscuzz's Avatar
kitscuzz kitscuzz is offline
Not alotta posts
AKA: Kit
FRC #1389 (Worst Case Scenario)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Home
Posts: 47
kitscuzz will become famous soon enough
Re: Robot style EOF?

Kevin tends to use chars as another form of integers. Chars are, in fact, simply numbers, 8 bits in length that happen to be interpreted differently when sent to a terminal. There is not an "End Of File" command because you never send strings except to the camera, and then you really only send the characters and the line in terminated by a \r or \n, and wait for the camera to reply appropriately.

The processor interprets the data based on the information given to it by the code, aka if you pass a character, the processor waits for 8 bits of data, there is no need to indicate the "EOF" of a character because the processor knows that there is only 8 bits, no more, no less.

The "End Of File" command is actually an antiquated way of identifying the end of files in old DOS operating systems. The "EOF" command is no longer used except as a method of terminating input at a terminal (and even then, it's rare because the EOF command varies based on the operating system, not the hardware), and for saving files for VERY old systems. It is also occasionally used as indicating the end of a file when being sent over the internet (look into netcat 1.0).

The reason most systems don't use the EOF anymore is because they simply identify the size of the file at the start of the data, and then the computer doesn't need to read the whole file in order to allocate an appropriate amount of memory to display the file.

Last edited by kitscuzz : 05-02-2007 at 23:50.