dbTalk Databases Forums  

.def files

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss .def files in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wendy Powley
 
Posts: n/a

Default .def files - 08-28-2003 , 12:11 PM






I've seen the following several times in .def files:

LIBRARY foo
EXPORTS
foo@24
foo = foo@24

What is the @24 for?

Thanks!

Wendy
School of Computing
Queen's University
Kingston, ON

Reply With Quote
  #2  
Old   
Garfield Lewis
 
Posts: n/a

Default Re: .def files - 08-28-2003 , 03:38 PM






Hi Wendy,

The @24 is the size of the parameters passed to foo. For instance given
functions:

int foo(int a, int b)
int foo2(int a)
int foo3(int a, char b)

You would get foo@8, foo2@4 and foo3@8 (in this case the sizeof(char) would
be rounded up to the WORD size).

take a look at this site it gives a good explanation:
http://www.codeproject.com/cpp/calli...emystified.asp

--
Garfield A. Lewis
DB2 UDB Development,
IBM Canada Laboratory


"Wendy Powley" <wendy (AT) cs (DOT) queensu.ca> wrote

Quote:
I've seen the following several times in .def files:

LIBRARY foo
EXPORTS
foo@24
foo = foo@24

What is the @24 for?

Thanks!

Wendy
School of Computing
Queen's University
Kingston, ON



Reply With Quote
  #3  
Old   
Wendy Powley
 
Posts: n/a

Default Re: .def files - 08-29-2003 , 08:41 AM



Thanks a lot Garfield! That explains why my code isn't compiling &
answers a question I've been wondering about for a while!

Wendy

Reply With Quote
  #4  
Old   
Wendy Powley
 
Posts: n/a

Default Re: .def files - 08-29-2003 , 03:08 PM



Ok, can you explain this to me? (This is code taken from an app that
compiles & works fine for me).

I have the following function definition:


create procedure foo ( in parm1 smallint,
in parm2 smallint,
out parm3 varchar(150),
out parm4 smallint,
out parm5 smallint,
in parm6 int)
language c
parameter style general
external name 'my_foo!foo'
fenced;

and the .def file looks like:

LIBRARY foo
EXPORTS
foo@24
foo = foo@24

How do we get 24 for the size of the parameters listed above?

Thanks again!

Wendy
~

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.