Skip to main content

Hopefully somone can give me some direction here.  I am required to call a dll passing a 'float' type as part of a structure. I'm not sure what this will translate to in acucobol. They use "QuadWord alignment (8 bytes)", I'm not sure if this is important or not.

Here is what I have regarding the function to call:

float  - 8 bytes floating point (this will be dollar amount with 2 decimal places)
string - length 30 (null terminated)
string - length 30 (null terminated)

Here is how I defined the structure in acucobol:

01  WS-Structure.
    03 WS-Float-Val    ?????????.
    03 WS-String1-Val  PIC X(30).
    03 WS-String2-Val  PIC X(30).

How should I define the float value?  Should I make it PIC 9(10)V99 COMP-5? How do I make sure it takes up 8 bytes?

I have a sample of the function call in delphi if that would help...

Thanks for any insight :-)

 

 

Hopefully somone can give me some direction here.  I am required to call a dll passing a 'float' type as part of a structure. I'm not sure what this will translate to in acucobol. They use "QuadWord alignment (8 bytes)", I'm not sure if this is important or not.

Here is what I have regarding the function to call:

float  - 8 bytes floating point (this will be dollar amount with 2 decimal places)
string - length 30 (null terminated)
string - length 30 (null terminated)

Here is how I defined the structure in acucobol:

01  WS-Structure.
    03 WS-Float-Val    ?????????.
    03 WS-String1-Val  PIC X(30).
    03 WS-String2-Val  PIC X(30).

How should I define the float value?  Should I make it PIC 9(10)V99 COMP-5? How do I make sure it takes up 8 bytes?

I have a sample of the function call in delphi if that would help...

Thanks for any insight :-)

 

 

I believe that

   03 ws-float-val usage double.

will work. You can verify that it is the right size by compiling with a listing (-Ls gives the symbol table).


Hopefully somone can give me some direction here.  I am required to call a dll passing a 'float' type as part of a structure. I'm not sure what this will translate to in acucobol. They use "QuadWord alignment (8 bytes)", I'm not sure if this is important or not.

Here is what I have regarding the function to call:

float  - 8 bytes floating point (this will be dollar amount with 2 decimal places)
string - length 30 (null terminated)
string - length 30 (null terminated)

Here is how I defined the structure in acucobol:

01  WS-Structure.
    03 WS-Float-Val    ?????????.
    03 WS-String1-Val  PIC X(30).
    03 WS-String2-Val  PIC X(30).

How should I define the float value?  Should I make it PIC 9(10)V99 COMP-5? How do I make sure it takes up 8 bytes?

I have a sample of the function call in delphi if that would help...

Thanks for any insight :-)

 

 

can that help?

documentation.microfocus.com/.../index.jsp


Hopefully somone can give me some direction here.  I am required to call a dll passing a 'float' type as part of a structure. I'm not sure what this will translate to in acucobol. They use "QuadWord alignment (8 bytes)", I'm not sure if this is important or not.

Here is what I have regarding the function to call:

float  - 8 bytes floating point (this will be dollar amount with 2 decimal places)
string - length 30 (null terminated)
string - length 30 (null terminated)

Here is how I defined the structure in acucobol:

01  WS-Structure.
    03 WS-Float-Val    ?????????.
    03 WS-String1-Val  PIC X(30).
    03 WS-String2-Val  PIC X(30).

How should I define the float value?  Should I make it PIC 9(10)V99 COMP-5? How do I make sure it takes up 8 bytes?

I have a sample of the function call in delphi if that would help...

Thanks for any insight :-)

 

 

Thanks I think that might do the trick (hopefully)... I won't know for sure until I can run it against some actual data..