Function Ptr

BlitzMax Forums/BlitzMax Programming/Function Ptr


Global b:Byte Ptr=MemAlloc(7)

b[0]=Byte(180)
b[1]=Byte(2)
b[2]=Byte(178)
b[3]=Byte(74)
b[4]=Byte(205)
b[5]=Byte(33)
b[6]=Byte(195)



Global func()=Byte Ptr(b)



func()



I also coded a variant using banks, but it's almost the same.