Thanks Rob and John ... simple when you “get it”. :-)

I knew I was missing something basic here.

Cheers,
Don

PS copied reply to pipeline listerv



On Sat, Nov 17, 2018 at 02:17 John P. Hartmann <[email protected]> wrote:

> To use the data type:
>
>         specs print vdev 1
>
> On 11/17/2018 09:05 AM, Donald Russell wrote:
> > The pipeline doc says  the PICK and SPEC stages support the "type"
> > meanings in a defined structure...
> >
> > To try this out I created a simple structure of a 2-byte, unsigned
> number...
> >
> > pipe struct list sample | cons
> > :sample    <length 2>
> >    vdev     U 1.02
> >
> > Now a simple pipe line to use it...
> > pipe (qualify sample) strliteral xfffe | specs m vdev c2d | console
> >
> > Results:
> > -2
> >
> > Expected result:
> > 65534
> >
> > I gather I'm misunderstanding something... but  if specs knows that
> > member vdev is unsigned, why does it treat it as signed when doing the
> > conversion to printable characters?
> >
> > Thanks,
> > Don
> >
>

Reply via email to