Index: trunk/FACT++/src/InterpreterV8.cc
===================================================================
--- trunk/FACT++/src/InterpreterV8.cc	(revision 14133)
+++ trunk/FACT++/src/InterpreterV8.cc	(revision 14135)
@@ -257,4 +257,17 @@
 }
 
+Handle<Value> InterpreterV8::FuncOut(const Arguments& args)
+{
+    for (int i=0; i<args.Length(); i++)
+    {
+        const HandleScope handle_scope;
+
+        const String::Utf8Value str(args[i]);
+        if (*str)
+            JsOut(*str);
+    }
+    return Undefined();
+}
+
 // The callback that is invoked by v8 whenever the JavaScript 'load'
 // function is called.  Loads, compiles and executes its argument
@@ -283,13 +296,30 @@
 Handle<Value> Convert(char type, const char* &ptr)
 {
+    // Dim values are always unsigned per (FACT++) definition
     switch (type)
     {
-    case 'F':  { Handle<Value> v=Number::New(*reinterpret_cast<const float*>(ptr));    ptr+=4; return v; }
-    case 'D':  { Handle<Value> v=Number::New(*reinterpret_cast<const double*>(ptr));   ptr+=8; return v; }
-    case 'I':  {
-    case 'L':    Handle<Value> v=Integer::New(*reinterpret_cast<const uint32_t*>(ptr)); ptr += 4; return v; }
-    case 'X':  { Handle<Value> v=Integer::New(*reinterpret_cast<const uint64_t*>(ptr)); ptr += 8; return v; }
-    case 'S':  { Handle<Value> v=Integer::New(*reinterpret_cast<const uint16_t*>(ptr)); ptr += 2; return v; }
-    case 'C':  { Handle<Value> v=Integer::New((uint16_t)*reinterpret_cast<const uint8_t*>(ptr));  ptr += 1; return v; }
+    case 'F':
+        {
+            // Remove the "imprecision" effect coming from casting a float to
+            // a double and then showing it with double precision
+            ostringstream val;
+            val << setprecision(7) << *reinterpret_cast<const float*>(ptr);
+            Handle<Value> v=Number::New(stod(val.str()));
+            ptr+=4;
+            return v;
+        }
+    case 'D':  { Handle<Value> v=Number::New(*reinterpret_cast<const double*>(ptr)); ptr+=8; return v; }
+    case 'I':
+    case 'L':  { Handle<Value> v=Integer::NewFromUnsigned(*reinterpret_cast<const uint32_t*>(ptr)); ptr += 4; return v; }
+    case 'X':
+        {
+            const uint64_t val = *reinterpret_cast<const uint64_t*>(ptr);
+            ptr += 8;
+            if (val>UINT32_MAX)
+                return Number::New(val);
+            return Integer::NewFromUnsigned(val);
+        }
+    case 'S':  { Handle<Value> v=Integer::NewFromUnsigned(*reinterpret_cast<const uint16_t*>(ptr)); ptr += 2; return v; }
+    case 'C':  { Handle<Value> v=Integer::NewFromUnsigned((uint16_t)*reinterpret_cast<const uint8_t*>(ptr));  ptr += 1; return v; }
     case ':':  { Handle<Value> v=String::New(ptr); return v; }
     }
@@ -448,4 +478,5 @@
     Handle<ObjectTemplate> dim = ObjectTemplate::New();
     dim->Set(String::New("print"),   FunctionTemplate::New(WrapPrint), ReadOnly);
+    dim->Set(String::New("out"),     FunctionTemplate::New(WrapOut),   ReadOnly);
     dim->Set(String::New("wait"),    FunctionTemplate::New(WrapWait),  ReadOnly);
     dim->Set(String::New("send"),    FunctionTemplate::New(WrapSend),  ReadOnly);
@@ -486,5 +517,4 @@
     //context.Dispose();
 
-    cout << "JsEnd" << endl;
     JsEnd(filename);
 
Index: trunk/FACT++/src/InterpreterV8.h
===================================================================
--- trunk/FACT++/src/InterpreterV8.h	(revision 14133)
+++ trunk/FACT++/src/InterpreterV8.h	(revision 14135)
@@ -29,4 +29,5 @@
     v8::Handle<v8::Value> FuncSleep(const v8::Arguments& args);
     v8::Handle<v8::Value> FuncPrint(const v8::Arguments& args);
+    v8::Handle<v8::Value> FuncOut(const v8::Arguments& args);
     v8::Handle<v8::Value> FuncInclude(const v8::Arguments& args);
     v8::Handle<v8::Value> FuncExit(const v8::Arguments& args);
@@ -39,4 +40,5 @@
     static v8::Handle<v8::Value> WrapInclude(const v8::Arguments &args) { if (This) return This->FuncInclude(args); else return v8::Undefined(); }
     static v8::Handle<v8::Value> WrapPrint(const v8::Arguments &args)   { if (This) return This->FuncPrint(args);   else return v8::Undefined(); }
+    static v8::Handle<v8::Value> WrapOut(const v8::Arguments &args)     { if (This) return This->FuncOut(args);     else return v8::Undefined(); }
     static v8::Handle<v8::Value> WrapWait(const v8::Arguments &args)    { if (This) return This->FuncWait(args);    else return v8::Undefined(); }
     static v8::Handle<v8::Value> WrapSend(const v8::Arguments &args)    { if (This) return This->FuncSend(args);    else return v8::Undefined(); }
@@ -66,4 +68,5 @@
     virtual void  JsEnd(const std::string &) { }
     virtual void  JsPrint(const std::string &) { }
+    virtual void  JsOut(const std::string &) { }
     virtual void  JsResult(const std::string &) { }
     virtual void  JsException(const std::string &) { }
Index: trunk/FACT++/src/RemoteControl.h
===================================================================
--- trunk/FACT++/src/RemoteControl.h	(revision 14133)
+++ trunk/FACT++/src/RemoteControl.h	(revision 14135)
@@ -165,4 +165,5 @@
     virtual void  JsEnd(const std::string &)          { UnsubscribeAll(); SetSection(-3); }
     virtual bool  JsSend(const std::string &str)      { return ProcessCommand(str); }
+    virtual void  JsOut(const std::string &msg)       { lout << msg << endl; }
     virtual void  JsPrint(const std::string &msg)     { if (fImp) fImp->Comment(msg.empty()?" ":msg); }
     virtual void  JsException(const std::string &str) { if (fImp) fImp->Error(str.empty()?" ":str); }
