> Hi,
>
> I want to create a global variable that I can set and use to call one of
> several different functions. I haven't been able to get it to work. Are
> there any examples that might help me with this?
basic C :)
---
// FUNCTION define
// return_type (*codePtr)(parameter_type, parameter_type);
//
Word (*codePtr)(Byte, Byte);
// function declarations
//
Word myFunction1(Byte a, Byte b);
Word myFunction2(Byte a, Byte b); // ... etc
// function assignment
//
codePtr = myFunction1; // or
codePtr = myFunction2;
// function usage
result = codePtr(10, 20);
---
got it? :) pointers are lovely - C is a godly language :)
az.
--
Aaron Ardiri
Java Certified Programmer http://www.hig.se/~ardiri/
University-College i G�vle mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN
Tel: +46 26 64 87 38 Fax: +46 26 64 87 88
Mob: +46 70 656 1143 A/H: +46 26 10 16 11