while; range is now for; remove ++ and --

This commit is contained in:
Ginger Bill
2017-01-03 19:11:12 +00:00
parent a86896e4d3
commit 70d4ca00df
20 changed files with 280 additions and 436 deletions
+5 -5
View File
@@ -313,19 +313,19 @@ __bounds_check_error :: proc(file: string, line, column: int, index, count: int)
__debug_trap();
}
__slice_expr_error :: proc(file: string, line, column: int, low, high, max: int) {
if 0 <= low && low <= high && high <= max {
__slice_expr_error :: proc(file: string, line, column: int, low, high: int) {
if 0 <= low && low <= high {
return;
}
fmt.fprintf(os.stderr, "%(%:%) Invalid slice indices: [%:%:%]\n",
file, line, column, low, high, max);
fmt.fprintf(os.stderr, "%(%:%) Invalid slice indices: [%:%]\n",
file, line, column, low, high);
__debug_trap();
}
__substring_expr_error :: proc(file: string, line, column: int, low, high: int) {
if 0 <= low && low <= high {
return;
}
fmt.fprintf(os.stderr, "%(%:%) Invalid substring indices: [%:%:%]\n",
fmt.fprintf(os.stderr, "%(%:%) Invalid substring indices: [%:%]\n",
file, line, column, low, high);
__debug_trap();
}