geoffrey dov cooper <MLY.G.SHADES%MIT-OZ@MIT-MC.ARPA> (02/06/85)
the question of passing ptrs to statics started, as i seem to remember (i deleted the mail already), with the fact that some specific 8086 compiler optimized the calls to be intra-segment. this is as it should be; good optimization. however the ptr that is generated by the c compiler should be a full ptr, i.e. segment and offset. if this is not the case then the compiler is defective. a static variable, which a function address can be, is defined as static to limit the scope of the variable name and define the data as being permanent not automatically allocated. therefore the address of any static is viable for passing. i suspect that the problem being encountered is something on the order of "extern static <type> <func-name>". if this is the case then the static declaration should be deleted. hope this helps shades%mit-oz@mit-mc.arpa -------