view rectypeTest/struct2.cbc @ 11:6d45489b5dcb

forget file
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 16 Apr 2015 19:40:07 +0900
parents bacef8675607
children
line wrap: on
line source


struct interface {
  __code (*next)();
 __rectype child;
  // __rectype *child;
  //  struct interface *child;
};

#include <stdio.h>
__code csA()
{
  printf("csA\n");
}

__code csB()
{
  printf("csB\n");
}

int main()
{
  struct interface p;
  p.next = csA;

  struct interface pp;
  pp.next = csB;
  p.child = &pp;

  //  goto p.child->next();
  goto p.child->next();
  
  return 0;
}