C programming help required ....

Ben Duncan bns
Fri Aug 26 07:46:14 PDT 2005


Ok, the number will always greater than 1001 and less than 999,999
Only ONE attribute and ONE multi value per integer will be stored.
Each integer represents a single attribute/multi value pair.


The break down is thus [ AAA,MMM ]
   where AAA = attribute number and
         MMM = Multi value number.

SO the integer number 7001 would represent
     Attribute 7
     First multi value in attribute 7

conversely integer number 7010 would represent
     Attribute 7
     the tenth multi value in attribute 7


Thanks ...


Roger Oberholtzer wrote:
> On Fri, 2005-08-26 at 03:49, Ben Duncan wrote:


> 
> These are very easy in C. 
> 
> Can you be more clear about what 7001 means? Is all of that number only
> indicating attribute 7? Or only part of it? What all should be stored in
> the 32 bits? How many attributes are to be supported in this integer?
<SNIP>


> 
> 
> 
>>int ATTRIBUTE, SUBVAL ;
>>
>>SUBVAL = KEYLIST[5] (and'ed or "or"d or shifted ?!?!)
>>ATTRIBUTE = KEYLIST[5] (and'ed or "or"d or shifted ?!?!)
>>
>>and now SUBVAL equals 1 and ATTRIBUTE equal 7 ...
>>
-- 
Ben Duncan   - VersAccounting Software LLC 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
        - Hanlon's Razor



More information about the Linux-users mailing list