コード例 #1
0
ファイル: Tuple.cs プロジェクト: tonyrog/jungerl
        /*
         * Convert this tuple to the equivalent Erlang external representation.
         *
         * @param buf an output stream to which the encoded tuple should be
         * written.
         **/
        public override void  encode(OtpOutputStream buf)
        {
            int arity = (int)(elems.Length);

            buf.write_tuple_head(arity);

            for (int i = 0; i < arity; i++)
            {
                buf.write_any(elems[i]);
            }
        }
コード例 #2
0
ファイル: List.cs プロジェクト: yonglehou/otp.net
        /*
         * Convert this list to the equivalent Erlang external
         * representation. Note that this method never encodes lists as
         * strings, even when it is possible to do so.
         *
         * @param buf An output stream to which the encoded list should be
         * written.
         *
         **/
        public override void  encode(OtpOutputStream buf)
        {
            int _arity = arity();

            if (_arity > 0)
            {
                buf.write_list_head(_arity);

                for (int i = 0; i < _arity; i++)
                {
                    buf.write_any(elems[i]);
                }
            }

            buf.write_nil();
        }
コード例 #3
0
ファイル: List.cs プロジェクト: saneman1/otp.net
		/*
		* Convert this list to the equivalent Erlang external
		* representation. Note that this method never encodes lists as
		* strings, even when it is possible to do so.
		*
		* @param buf An output stream to which the encoded list should be
		* written.
		*
		**/
		public override void  encode(OtpOutputStream buf)
		{
			int _arity = arity();
			
			if (_arity > 0)
			{
				buf.write_list_head(_arity);
				
				 for (int i = 0; i < _arity; i++)
				{
					buf.write_any(elems[i]);
				}
			}
			
			buf.write_nil();
		}
コード例 #4
0
ファイル: Tuple.cs プロジェクト: e42s/jungerl
        /*
        * Convert this tuple to the equivalent Erlang external representation.
        *
        * @param buf an output stream to which the encoded tuple should be
        * written.
        **/
        public override void encode(OtpOutputStream buf)
        {
            int arity = (int) (elems.Length);

            buf.write_tuple_head(arity);

             for (int i = 0; i < arity; i++)
            {
                buf.write_any(elems[i]);
            }
        }