|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: iSCSI: Text/Operational keys: booleans and ranges"Daniel F. Smith" wrote: > > An old trick is to use bit 0 of the first (UTF-8) character. > This gets: > 1 for "1", "Yes", "yes", "oui", "si" (but not "ja", "da" or "hai") > 0 for "0", "No", "non" (but not "ei") But this makes things worse as one would rely on low level representation to figure out the value, so we are better off comparing case sensitive strings... in the low level protocol implementation... How about ranges using the dash? True, one could _count_ the commas to fugure out if it is a list (number of commas > 1) or a range (number of commas = 1), but you have to add code to _count_ the commas. Using a dash for ranges, the list of numerical values is handled by default by the already existing code in your implementation to intesect two strings of comma separated objects. Anyone? -- Luben
Home Last updated: Tue Mar 12 14:18:16 2002 9065 messages in chronological order |