To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 25287
25286  |  25288
Subject: 
RE: Why Java for Robots (was NXT and bluetooth enabled phones)
Newsgroups: 
lugnet.robotics
Date: 
Tue, 17 Jan 2006 15:50:25 GMT
Original-From: 
Laurent Desnogues <LAURENT.DESNOGUES@ARMantispam.COM>
Viewed: 
1538 times
  
PeterBalch wrote:

What is a robot sitting on Mars to do if it gets an "out of
memory" or "illegal pointer value" or "array bounds exceeded"
error? The first two should never ever happen in a robot. The
last should have been caught by the compiler.

   Well what about an indexation based on a sensor value?
How could your compiler know the range the sensor has?

Sample:

int volatile *color_sensor = (int *) 0x4000;

int getColor(void)
{
    static int color[4] = { 123, 456, 789, 111 };
    return color[*color_sensor];
}

How would you tell your C compiler that the real range of the
color sensor is 0..4 and not 0..3?  No static analysis will
get that!

   I guess that puts C in your "shoot the language-designer"
category :)


Laurent

-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium.  Thank you.



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR