text: public int CreateFormat(String formatString){maxformatid = maxformatid >= (short)0xa4 ? (short)(maxformatid + 1) : (short)0xa4; FormatRecord rec = new FormatRecord(maxformatid, formatString);int pos = 0;while (pos < records.Count && records[pos].Sid != FormatRecord.sid)pos++;pos += formats.Count;formats.Add(rec);records.Add(pos, rec);return maxformatid;}