コード例 #1
0
ファイル: SEGY_Constant.cs プロジェクト: myak555/PETRONODE
        /// <summary>
        /// Creates the constant from the string input
        /// </summary>
        /// <param name="input">string as in SEG-Y EBCDIC Header file</param>
        public SEGY_Constant(int line, byte[] input)
        {
            int         offset = line * 80;
            NumberUnion nu     = new NumberUnion();
            string      s      = BufferConverter.GetEBCDICBytesString(input, nu, 3, offset);

            if (s.Length < 3)
            {
                line++;
                s = "C" + line.ToString().PadLeft(2);
            }
            Name        = s;
            Value       = BufferConverter.GetEBCDICBytesString(input, nu, 77, offset);
            Unit        = "";
            Description = "Comment line " + s + ".";
        }