Calling an internal procedure by pointer?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ebknoppert.


I need to call procedures by pointer, the parameters are fixed per procedure.

I see CallFunction() but it's for exported functions.
Can i make use of CallFunctionFast() ?

Obtaining procedure addresses will be @MyProc1() right?
I still have the demo (waiting.... :) ) , does not allow this.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by GPI.

this should work:

Code: Select all

procedure test(a,b,c)
  debug a,b,c
  procedurereturn a+b+c
endprocedure

*proc=@test()
debug callfunctionfast(*proc,1,2,3)
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
Post Reply