Index: toltcl/generic/tolaccess.cpp
===================================================================
--- toltcl/generic/tolaccess.cpp	(revision db123606c097b8954e1f3c6b91037dcb3bf03d23)
+++ toltcl/generic/tolaccess.cpp	(revision fe54d8ddf262f2d06d7d478c0a3168f64eda0bf7)
@@ -2437,5 +2437,37 @@
   }
   BText addr = syn->GetAddressFromObject( );
-  Tcl_AppendStringsToObj( obj_result, addr.Buffer( ), NULL );
+  Tcl_SetStringObj( obj_result, addr.Buffer( ), -1 );
+  return TCL_OK;
+}
+                            
+/*
+ * Fill in obj_result the specific type for an Anything object, could
+ * be: Struct, Class or Anything.
+ */
+int Tol_GetAnythingType( Tcl_Interp * interp,
+                         Tcl_Obj * obj_ref,
+                         Tcl_Obj * obj_result)
+{
+  const BSyntaxObject *syn ;
+
+#ifndef _NDEBUG
+  //#define _PRINT_ANYTHING_OBJREF_
+#endif
+
+#ifdef _PRINT_ANYTHING_OBJREF_
+  printf( "obj_ref = %s\n", Tcl_GetString( obj_ref ) );
+#endif
+
+  if ( !( syn = Tol_ResolveObject( interp, obj_ref, obj_result ) ) ) {
+    return TCL_ERROR;
+  }
+  
+  if ( syn->Mode() == BCLASSMODE ) {
+    Tcl_SetStringObj( obj_result, "Class", -1 );
+  } else if ( syn->Mode() == BSTRUCTMODE ) {
+    Tcl_SetStringObj( obj_result, "Struct", -1 );
+  } else {
+    Tcl_SetStringObj( obj_result, "Anything", -1 );
+  }
   return TCL_OK;
 }
Index: toltcl/generic/toltcl.c
===================================================================
--- toltcl/generic/toltcl.c	(revision db123606c097b8954e1f3c6b91037dcb3bf03d23)
+++ toltcl/generic/toltcl.c	(revision fe54d8ddf262f2d06d7d478c0a3168f64eda0bf7)
@@ -964,4 +964,16 @@
                                               objv[2], obj_result );
       }
+    } else if (!strncasecmp("anything", arg, length)) {
+      if (objc != 3) {
+        Tcl_AppendStringsToObj(obj_result,
+                               "wrong # args: should be '",
+                               Tcl_GetString(objv[0]),
+                               " anything {grammar|container objname ?indexes?}'",
+                               NULL);
+        tcl_result = TCL_ERROR;	
+      } else {
+	tcl_result = Tol_GetAnythingType( interp,
+                                          objv[2], obj_result );
+      }
     } else if (!strncasecmp("included", arg, length)) {
       if (objc == 2)
Index: toltcl/generic/toltclInt.h
===================================================================
--- toltcl/generic/toltclInt.h	(revision db123606c097b8954e1f3c6b91037dcb3bf03d23)
+++ toltcl/generic/toltclInt.h	(revision fe54d8ddf262f2d06d7d478c0a3168f64eda0bf7)
@@ -124,4 +124,12 @@
                                                  Tcl_Obj * obj_ref,
                                                  Tcl_Obj * obj_result));
+/*
+ * Fill in obj_result the specific type for an Anything object, could
+ * be: Struct, Class or Anything.
+ */
+extern int Tol_GetAnythingType _ANSI_ARGS_( (Tcl_Interp * interp,
+                                             Tcl_Obj * obj_ref,
+                                             Tcl_Obj * obj_result));
+
 /*! Return the path of a set if it is a file, trigger an error in other case
  */
