March 8th, 2000, 11:25 AM
Is there a way to retrieve the numerical value stored in a SET column rather than the string of elements the number refers to? I want to write a routine to be able to add an element _in the middle_ of a list of set elements. This means that I will have to do some bit-shifting so that elements later in the SET definition will still be flagged properly. I've written up a blurb I can e-mail anyone interested in SETs. I'm hoping someone might have some experience they'd care to share.
March 24th, 2000, 12:18 PM
Why would you want to do this?
The only reasons I can think of are:
1) Alphabetizing the list
2) Relying on the bit-positions for some binary code calls.
My reply to the above would be:
1) Not worth the effort. Have the function which gets the list to begin with sort it.
2) Not portable between architectures
[This message has been edited by Erik Lindsley (edited March 24, 2000).]
March 27th, 2000, 04:31 PM
I'm leaning towards `not worth it`. The idea was to use the memory economy of a SET (one or two bytes rather than one byte per character) while still allowing customization of the list by the user. Customization by alphabetization or whatever. The input would come from a group of checkboxes or a < select multiple> I do have sites where I a droplist is generated from a database table, and the user can add to and rearrange the order of items in the list. I'm trying to implement the same flexibility in displaying the output. Perhaps the way to go is the parse the output string and then arrange the bits...