예제 #1
0
파일: Native.cs 프로젝트: yibit/flow9
        public Object println(Object arg)
        {
#if WINDOWS_APP
            Debug.WriteLine(FlowRuntime.toString(arg));
#else
            Console.WriteLine(FlowRuntime.toString(arg));
#endif
            return(null);
        }
예제 #2
0
파일: Native.cs 프로젝트: yibit/flow9
 public int elemIndex(Object[] arr, Object item, int illegal)
 {
     for (int i = 0; i < arr.Length; i++)
     {
         if (FlowRuntime.compareByValue(arr[i], item) == 0)
         {
             return(i);
         }
     }
     return(illegal);
 }
예제 #3
0
        public override String ToString()
        {
            StringBuilder buf  = new StringBuilder();
            String        name = getTypeName();

            buf.Append(name);

            if (name == "DLink")
            {
                buf.Append("(...)");
                return(buf.ToString());
            }

            buf.Append('(');

            RuntimeType[] types  = getFieldTypes();
            Object[]      values = getFields();

            for (int i = 0; i < values.Length; i++)
            {
                if (i > 0)
                {
                    buf.Append(", ");
                }

                if (types[i] == RuntimeType.DOUBLE && (values[i] is int || values[i] is double))
                {
                    buf.Append(FlowRuntime.doubleToStringWithDot((double)values[i]));
                }
                else
                {
                    buf.Append(FlowRuntime.toString(values[i]));
                }
            }

            buf.Append(')');

            return(buf.ToString());
        }
예제 #4
0
파일: Native.cs 프로젝트: yibit/flow9
 public String toString(Object value)
 {
     return(FlowRuntime.toString(value));
 }
예제 #5
0
파일: Native.cs 프로젝트: yibit/flow9
 public bool isArray(Object obj)
 {
     return(FlowRuntime.isArray(obj));
 }
예제 #6
0
 internal void Init(FlowRuntime rt)
 {
     runtime = rt;
     initialize();
 }
예제 #7
0
 public DeferredContext(FlowRuntime runtime)
 {
     this.runtime = runtime;
     depth        = ++runtime.deferred_depth;
 }
예제 #8
0
 public override String ToString()
 {
     return("ref " + FlowRuntime.toString(value));
 }