In plastic pipes you can specify a C2Uconversion as well as a conversion
function:

specs   1.8 c2u 1
specs   a: 1.12 .  set #0+=c2u(a)

2011/2/2 van Sleeuwen, Berry <[email protected]>

> Hello listers,
>
> We have a pipeline to process monitor records. Most fields contain 4
> byte unsigned integer counters. Some (such as the CPU counters) are even
> 8 byte. The records are processed with SPECS to select fields and
> convert them into decimal where applicable. To be able to process 8
> bytes we use the runtime distribution and use C2D(8) to convert the
> counters into a decimal, 4 bytes are processed with plain C2D.
>
> We have a few counters that get quite big over time. To avoid a negative
> number I just added '00' in front of it to avoid the effect that a
> number larger than '7FFF FFFF' would become a negative in C2D. But once
> again a counter has grown past '7FFF FFFF'. So yet another counter that
> should get an additional '00'.
>
> Is there be a way to process unsigned counters directly instead of
> putting a '00' in front of it to avoid getting a negative number?
>
> Met vriendelijke groet/With kind regards,
> Berry van Sleeuwen
> Flight Forum 3000 5657 EW Eindhoven
>
>

Reply via email to