/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include "ptfun3.h"

void ptfun3_1(float f, int i) {
  printf("ptfun3_1() in ptfun3.ch is called, f = %f, i = %d\n", f, i);
  return;
}

void ptfun3_2(float f, int i) {
  printf("ptfun3_2() in ptfun3.ch is called, f = %f, i = %d\n", f, i);
  return;
}

int main() {
  int id;
  funcHandle handle;

  /* set function handle */
  ptfun3_setHandle(1, ptfun3_1);
  ptfun3_setHandle(2, ptfun3_2);

  /* get function handle */
  handle = ptfun3_getHandle(1);
  handle(1.1, 1);
  handle = ptfun3_getHandle(2);
  handle(2.2, 2);

  ptfun3_setHandle(2, ptfun3_1);
  ptfun3_getHandle(2)(1.1, 1);

  return 0;
}
