Often found in C, but better expressed using OOP. as method tables
This example tests a function call made through 2 referenced (pointered) structures:
function fun(int n) as int, label
=================================
return n*2
end function
type level1
===========
int a
int (fun)(int n) 'pointer assumed
'int (*fun)(int n) 'C style
'function fun (int n) as int 'Basic style
end type
type level2
===========
int b
level1 * l1 '
'level1 ptr l1
'l1 as level1 ptr
end type
'#recordof _level1
'#recordof _level2
level1 * l1 = getmemory 16
@l1.fun=@fun 'linkage
level2 * l2 = getmemory 16
@l2.l1=@l1 'linkage
'TEST
a = l2.l1.fun 123
'C EQUIVALENT
'a = *l2->l1->fun(123);
print a '246
freememory @l1
freememory @l2