From 00460640e1c689685dc297fd5a2ce5d15e74fda6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Thu, 15 Aug 1996 01:38:10 +0200
Subject: [PATCH] operator overloading added

Rev: doc/lpc/cast:1.2
---
 doc/lpc/cast | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/doc/lpc/cast b/doc/lpc/cast
index 0ce25fc9fb..c55f817036 100644
--- a/doc/lpc/cast
+++ b/doc/lpc/cast
@@ -21,8 +21,23 @@ DESCRIPTION
 	given by that string. It will then put the program in a chache in
 	case you cast the same string to a program again later.
 
+	Castring from string to object will call cast_to_object in the
+	master object and request an object to return. The standard master
+	object will consider the string a file name, cast it to a program
+	and return a clone of that file. If the same cast is attempted again
+	later, the _same_ object will be returned.
+
+	When casting an object, the method o->cast will be called with a string
+	with the name of the type as argument. o->cast can then return any
+	value.
+
 	In all other cases, casts are just compiler hints.
 
+EXAMPLES
+	(program)"/precompiled/file"	// returns the file program
+	(object)"/precompiled/file"	// returns a clone of the file program
+	(int)(object)"/precompiled/mpz" // returns 0
+
 KEYWORDS
 	lpc
 
-- 
GitLab