type.
Dim TestArray(6)
Dim ResultArray
Dim Idx%
Dim SubS$
' All items of TestArray must be of the same type - String, Number, Date
%REM
' String test
TestArray(0) = "Paul"
TestArray(1) = "Peter"
TestArray(2) = "Paul"
TestArray(3) = "Georg"
TestArray(4) = "John"
TestArray(5) = "Paul"
TestArray(6) = "Peter"
%END REM
%REM
' Date test
TestArray(0) = Cdat("10.7.2000")
TestArray(1) = Cdat("14.7.2000")
TestArray(2) = Cdat("1.1.2000")
TestArray(3) = Cdat("10.7.2000")
TestArray(4) = Cdat("4.7.2000")
TestArray(5) = Cdat("14.7.2000")
TestArray(6) = Cdat("1.1.2001")
%END REM
' Number test
TestArray(0) = 1
TestArray(1) = 1.2
TestArray(2) = 2
TestArray(3) = 5
TestArray(4) = 1.2
TestArray(5) = 3
TestArray(6) = 2
SubS = ""
For Idx = Lbound(TestArray) To Ubound(TestArray)
Select Case Datatype(TestArray(Idx))
Case 2, 3, 4, 5, 6: ' V_INTEGER, V_LONG, V_SINGLE, V_DOUBLE, V_CURRENCY
SubS = SubS & "@ReplaceSubstring(@Text(""" & Cstr(TestArray(Idx)) &
""");"","";""."")"
' If number is converted to xxx,yyy instead of xxx.yyy - done by system
local settings -> restore original
Case 7: ' V_DATE
SubS = SubS & "[" & Cstr(TestArray(Idx)) & "]"
Case 8: ' V_STRING
Requires Free Membership to View
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
SubS = SubS & """" & Cstr(TestArray(Idx)) & """"
End Select
If idx < Ubound(TestArray) Then SubS = SubS & ":"
Next
ResultArray = Evaluate("@Unique(@Text(" & SubS & "))")
This was first published in November 2000