Index: uspace/app/sbi/src/builtin/bi_error.c
===================================================================
--- uspace/app/sbi/src/builtin/bi_error.c	(revision ecb6ac3260db8fa03e8e388fb729beb20587181b)
+++ uspace/app/sbi/src/builtin/bi_error.c	(revision ecb6ac3260db8fa03e8e388fb729beb20587181b)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @file Error classes (used with exception handling). */
+
+#include <assert.h>
+#include "../builtin.h"
+#include "../mytypes.h"
+#include "../symbol.h"
+
+#include "bi_error.h"
+
+/** Declare error class hierarchy. */
+void bi_error_declare(builtin_t *bi)
+{
+	/*
+	 * Declare class Error and its subclasses.
+	 * Here, class Error supplants a package or namespace.
+	 */
+
+	builtin_code_snippet(bi,
+		"class Error is\n"
+			/* Common ancestor of all error classes */
+			"class Base is\n"
+			"end\n"
+			/* Accessing nil reference */
+			"class NilReference : Base is\n"
+			"end\n"
+			/* Array index out of bounds */
+			"class OutOfBounds : Base is\n"
+			"end\n"
+		"end\n");}
+
+/** Bind error class hierarchy. */
+void bi_error_bind(builtin_t *bi)
+{
+	stree_symbol_t *sym;
+
+	/* Declare class Error and its subclasses. */
+
+	sym = builtin_find_lvl1(bi, "Error", "OutOfBounds");
+	bi->error_outofbounds = symbol_to_csi(sym);
+	assert(bi->error_outofbounds != NULL);
+
+	sym = builtin_find_lvl1(bi, "Error", "NilReference");
+	bi->error_nilreference = symbol_to_csi(sym);
+	assert(bi->error_nilreference != NULL);
+}
Index: uspace/app/sbi/src/builtin/bi_error.h
===================================================================
--- uspace/app/sbi/src/builtin/bi_error.h	(revision ecb6ac3260db8fa03e8e388fb729beb20587181b)
+++ uspace/app/sbi/src/builtin/bi_error.h	(revision ecb6ac3260db8fa03e8e388fb729beb20587181b)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef BI_ERROR_H_
+#define BI_ERROR_H_
+
+#include "../mytypes.h"
+
+void bi_error_declare(builtin_t *bi);
+void bi_error_bind(builtin_t *bi);
+
+#endif
Index: uspace/app/sbi/src/builtin/bi_fun.c
===================================================================
--- uspace/app/sbi/src/builtin/bi_fun.c	(revision 37f527bc07305262cbe6d63e6c152419e5050304)
+++ uspace/app/sbi/src/builtin/bi_fun.c	(revision ecb6ac3260db8fa03e8e388fb729beb20587181b)
@@ -32,4 +32,5 @@
 #include <stdlib.h>
 #include <assert.h>
+#include "../bigint.h"
 #include "../builtin.h"
 #include "../list.h"
@@ -107,5 +108,6 @@
 	switch (var->vc) {
 	case vc_int:
-		printf("%d\n", var->u.int_v->value);
+		bigint_print(&var->u.int_v->value);
+		putchar('\n');
 		break;
 	case vc_string:
Index: uspace/app/sbi/src/builtin/bi_textfile.c
===================================================================
--- uspace/app/sbi/src/builtin/bi_textfile.c	(revision 37f527bc07305262cbe6d63e6c152419e5050304)
+++ uspace/app/sbi/src/builtin/bi_textfile.c	(revision ecb6ac3260db8fa03e8e388fb729beb20587181b)
@@ -32,4 +32,5 @@
 #include <stdlib.h>
 #include <assert.h>
+#include "../bigint.h"
 #include "../builtin.h"
 #include "../debug.h"
@@ -344,5 +345,5 @@
 	/* Construct return value. */
 	eof_int = rdata_int_new();
-	eof_int->value = eof_flag;
+	bigint_init(&eof_int->value, eof_flag);
 
 	eof_var = rdata_var_new(vc_int);
