gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Re: static cobol 2 c


From: Xavier COUDIN
Subject: Re: [open-cobol-list] Re: static cobol 2 c
Date: Sun Oct 23 23:18:18 2005

thanks for this comment,

what about float/double numbers ?

----------------------------------------------------

On Sat, 22 Oct 2005 22:22:01 +0200
Roger While <address@hidden> wrote:

> Adding to Gary's comments -
> There are 2 more fundamental issues -
> 1)  The Little/Big endian consideration
> 2)  The field size
> 
> In order to directly use C short/int/long long, then binary fields
> should be defined as COMP-5 (ie. Native byte order).
> Also, the field length must be correct.
> So,
> PIC S9(4)   COMP-5            (signed) short
> PIC 9(4)     COMP-5           unsigned short
> PIC S9(8)   COMP-5            (signed) int
> PIC 9(8)     COMP-5           unsigned int
> PIC S9(18) COMP-5             (signed) long long
> PIC 9(18)   COMP-5            unsigned long long
> 
> As Gary pointed out, if the short/int/long long field is not
> naturally aligned, then you must pack the structure; eg gcc's
> attribute packed.
> 
> Roger
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of
> 2005 Visit http://www.jboss.com/services/certification for more
> information _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
> 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]