Execute Brain****/Java: Difference between revisions
Content added Content deleted
m (Split up the big ugly paragraph and added even more description (someone tell me to stop)) |
m (Got rid of an extra line, made one part a bit more efficient, and made an error report a bit better.) |
||
Line 107: | Line 107: | ||
break; |
break; |
||
case '<': |
case '<': |
||
if(pointer |
if(--pointer < 0){ |
||
//can't do it |
//can't do it |
||
System.err.println("Pointer out of range (negative)."); |
System.err.println("Pointer out of range (negative)."); |
||
return; |
return; |
||
} |
} |
||
pointer--; |
|||
break; |
|||
default: |
default: |
||
} |
} |
||
} |
} |
||
}catch(FileNotFoundException e){ |
}catch(FileNotFoundException e){ |
||
System.err.println("Error opening file."); |
System.err.println("Error opening file: " + args[0] + "."); |
||
}catch(IOException e){ |
}catch(IOException e){ |
||
System.err.println("Error on input."); |
System.err.println("Error on input."); |