Posted by Albert Gareev on Mar 25, 2008
What’s it about? In Math service functions library I have generic functions for both array and set data formats. Those, who kept track of my postings probably noticed a functional redundancy, and was wondering why I define all the same functions for sets as I just did for arrays. With this post I provide explanations [...] ...
Posted by Albert Gareev on Mar 23, 2008
Parent page: Service Functions – Math (QTP, VBScript) Check whether an item is in set Public Function isItemInSet(ByVal stSet, ByVal sItem, ByVal sSetSeparator) Dim dvArray If sItem = "" Then isItemInSet = False Exit Function End If dvArray = Set2Array(stSet, sSetSeparator) isItemInSet = isItemInArray(dvArray) End Function ...
Posted by Albert Gareev on Mar 22, 2008
Parent page: Service Functions – Math (QTP, VBScript) Check whether a set consists of numeric values Public Function isSetNumeric(ByVal stSet, ByVal sSetSeparator) Dim dvArray dvArray = Set2Array(stSet, sSetSeparator) isSetNumeric = isArrayNumeric(dvArray) End Function Check whether a set consists of date/time values Public Function isSetDate(ByVal stSet, ByVal sSetSeparator) Dim dvArray [...] ...
Posted by Albert Gareev on Mar 20, 2008
Parent page: Service Functions – Math (QTP, VBScript) Convert set to typed array Public Function Set2TypedArray(ByVal stSet, ByVal sSetSeparator, ByVal sFormat) Dim Iter, dvArray If sSetSeparator = "" Then sSetSeparator = chrSetSeparator End If stSet = Replace(stSet, "\,", Chr(176)) stSet = Replace(stSet, "\ ", Chr(187)) dvArray = Split(stSet, sSetSeparator) [...] ...
Posted by Albert Gareev on Mar 15, 2008
Design first Before producing any code we need to think of an algorithm first. This is a design phase. Design could be narrow – in this case all the details are created “on the fly”, while coding; or it could be very detailed, with functional diagrams and pseudo-code. Unit Function Design Unit function design aims [...] ...
Posted by Albert Gareev on Mar 10, 2008
Proverbs and quotes I have not failed. I’ve just found 10,000 ways that won’t work. Thomas Edison Good judgment comes from experience, and often experience comes from bad judgment. Rita Mae Brown If the past cannot teach the present and the father cannot teach the son, then history need not have bothered to go on, and [...] ...