public static int DCOUNT(UvVar array, UvVar delimiter) { switch ((char)delimiter) { case (char)254: { return(0); //ToDo: return array.Count(); } case (char)253: { return(0); //ToDo: return array.Count(1); } case (char)252: { return(0); //ToDo: return array.Count(1, 1); } default: { return(0); } } }
public static bool READV(ref int singleValue, UvVar uvFile, string itemId, int attributeNo) { //ToDo: uvFile.RecordID = itemId; try { //ToDo: uvFile.ReadField(attributeNo); //ToDo: singleValue = int.Parse(uvFile.ReadField(attributeNo).StringValue); return(true); } catch { } return(false); }
public static bool READ(ref string text, UvVar uvFile, string itemId) { //ToDo: uvFile.RecordID = itemId; try { //ToDo: uvFile.Read(); //ToDo: text = uvFile.Record.StringValue; return(true); } catch { } return(false); }
public static bool READ(ref UvVar dynArray, UvVar uvFile, UvVar itemId) { //ToDo: uvFile.RecordID = itemId; try { //ToDo: uvFile.Read(); //ToDo: dynArray = new UvVar(uvFile.Record.StringValue); return(true); } catch { } return(false); }
public UvVar Clone() { // deep copy in separate memory space MemoryStream memoryStream = new MemoryStream(); BinaryFormatter binaryFormatter = new BinaryFormatter(); binaryFormatter.Serialize(memoryStream, this); memoryStream.Position = 0; UvVar copyPv2 = (UvVar)binaryFormatter.Deserialize(memoryStream); memoryStream.Close(); return(copyPv2); }
private int CompareTo(UvVar operand) { if ((this.Type | operand.Type) == UvVarType.Number) { return(this.DecimalValue.CompareTo(operand.DecimalValue)); } if ((this.Type | operand.Type) == UvVarType.Text) { int result1; int result2; if (Int32.TryParse(this.StringValue, out result1) && Int32.TryParse(operand.StringValue, out result2)) { return(result1.CompareTo(result2)); } else { return((this.StringValue).CompareTo(operand.StringValue)); } } if ((this.Type == UvVarType.Number && operand.Type == UvVarType.Text)) { // Convert Text to Number, if possible and do a Numeric comparison otherwise // do a Text comparison int result2; if (Int32.TryParse(operand.StringValue, out result2)) { return(this.DecimalValue.CompareTo(result2)); } else { return(this.DecimalValue.ToString().CompareTo(operand.StringValue)); } } if ((this.Type == UvVarType.Text && operand.Type == UvVarType.Number)) { // Convert Text to Number, if possible and do a Numeric comparison otherwise // do a Text comparison int result1; if (Int32.TryParse(this.StringValue, out result1)) { return(result1.CompareTo(operand.DecimalValue)); } else { return(this.StringValue.CompareTo(operand.DecimalValue.ToString())); } } return(0); }
public static UvVar MATCH(UvVar value, UvVar pattern) { return(0); }
public static UvVar NUM(UvVar value) { return(0); }
public static bool OPENSEQ(string fileName, out UvVar file) { file = 0; return(true); }
public static ReadUResult READU_LOCKED(ref UvVar dynArray, UvVar uvFile, string itemId) { return(ReadUResult.Success); }
public static bool READV(ref UvVar dynArray, UvVar uvFile, UvVar itemId, UvVar attributeNo) { return(true); }
public static bool READBLK(ref string text, UvVar uvFile) { return(true); }
public static UvVar DEL(UvVar dynarray) { return(""); }
public static void BREAK(UvVar value) { }
public static string TRIM(UvVar value) { return(""); }
public static void ECHO(UvVar value) { }
//ToDo: //public static void CALL_EXECUTE( // string routineName, // string instruction, // string options, // out UvVar returnList, // out bool listAvailable, // out UvVar messages, // out UvVar errors) //{ // //ToDo: returnList = new UvVar(); // listAvailable = false; // //ToDo: messages = new UvVar(); // //ToDo: errors = new UvVar(); //} public static UvVar SYSTEM(UvVar systemNo) { return(""); }
public static UvVar SEQ(UvVar value) { return(""); }
public static UvVar INSERT(UvVar dynarray, UvVar att, UvVar value) { return(""); }
public static decimal RND(UvVar value) { return(0); }
public static UvVar INS(UvVar value, UvVar dynarray) { return(""); }
public static bool NOT(UvVar value) { return(true); }
public static UvVar DELETE(UvVar dynarray, UvVar att, UvVar mv, UvVar sv) { return(""); }
public static bool ASSIGNED(UvVar value) { return(true); }
public static int ABS(UvVar value) { return(0); }
public static UvVar MOD(UvVar value1, UvVar value2) { return(0); }
public static bool READVU(ref int singleValue, UvVar uvFile, string itemId, int attributeNo) { return(true); }
public static bool READU(ref UvVar dynArray, UvVar uvFile, string itemId) { return(true); }
public static void MAT(ref UvVar[,] destination, UvVar source) { }
public static bool OPENDICT(string fileName, out UvVar file) { file = 0;//ToDo: file = UvSession.GetInstance().CreateUvVar(fileName); return(true); }