I know that e.g the Month function will extract a value from a date type variable as January to December. What I'm looking for is a way to do this:
type A_Sample_Set=set of
MyValue1, MyValue2, MyValue3,...,MyValueN
dim MySet as A_Sample_Set
ThisUserInput=InputBox("Enter a value from "+MySet(1)"+" to "+MySet(n))
if ThisUserInput not in(A_Sample_Set) then
msgbox("user input was not in the set ")
msgbox("You entered "+ThisUserInput)
The idea behind my request is that I can use these definitions in a header/global variable so as not to have to always read them from a datapool, or maintain an array of the permissible values. Any ideas people?
Re: Has anyone found a way to define sets in Robot?
enum is the answer you are looking for, but unfortunately, SQABasic doesn't support this function. I guess you will have to resort to Datapool/flat file option unless you want to implement the enum function by yourself.