It is currently Tue Dec 23, 2014 2:38 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject:
PostPosted: Thu Aug 23, 2001 9:24 am 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by richard.

hi,

i need some help and i hope you all can.
how does one deal with this situation?

prototype of a "c functon"

void *NewFunction(unsigned long hint, unsigned char threshold, int cmp(const void *x, const void *y), int hash(const void *key, const int hashsize));

pb capsule:

extern _stdcall long *PB_NewFunction(unsigned long hint, long *hash, long *cmp, int threshold)
{
return NewHash(hint, threshold, cmp, hash);
}

; First line: the langage (C or ASM)
C
0
; The title of the library (not requiered)
;HashTables
; The command list. The command syntax is: Name, Arg1, Arg2, ...
; Arguments can be: 'Byte', 'Word', 'Long' or 'String'
NewFunction, long, long, long, word
long

what would that look like with function pointers??
furthermore, what does the descriptor file look like if there is no return value? must there always be something returned? how does one deal with function pointers?

regards

richard


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2001 10:39 am 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by richard.

hi,

correction: (!!!!!)


void *NewFunction(unsigned long hint, unsigned char threshold, int cmp(const void *x, const void *y), int hash(const void *key, const int hashsize));

pb capsule:

extern _stdcall long *PB_NewFunction(unsigned long hint, long *hash, long *cmp, int threshold)
{
return NewFunction(hint, threshold, cmp, hash); (!!!!!)
}




Quote:
hi,

i need some help and i hope you all can.
how does one deal with this situation?

prototype of a "c functon"

void *NewFunction(unsigned long hint, unsigned char threshold, int cmp(const void *x, const void *y), int hash(const void *key, const int hashsize));

pb capsule:

extern _stdcall long *PB_NewFunction(unsigned long hint, long *hash, long *cmp, int threshold)
{
return NewHash(hint, threshold, cmp, hash);
}

; First line: the langage (C or ASM)
C
0
; The title of the library (not requiered)
;HashTables
; The command list. The command syntax is: Name, Arg1, Arg2, ...
; Arguments can be: 'Byte', 'Word', 'Long' or 'String'
NewFunction, long, long, long, word
long

what would that look like with function pointers??
furthermore, what does the descriptor file look like if there is no return value? must there always be something returned? how does one deal with function pointers?

regards

richard




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: emerkel and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye