I have a lot of functions which are very similar to this. They came from Dyalog. This function creates and calls a []NA version of itself.
z := glNormal3f x
:If 3 <> []NC 'glNormal3f_DLL'
'glNormal3f_DLL' []NA'OpenGL32.DLL.C32|glNormal3f F4 F4 F4'
:EndIf
z := glNormal3f_DLL x
What I started to do is group families of functions together such that they all live in one object. I use []IC to do this, i.e.
'gl' []IC 'glNormal' (I will eventually rename the functions to remove the "gl")
Now I would like the []NA function to live in the object. I would be inclined to write:
z := Normal3f x
:If 3 <> gl.[]NC 'Normal3f_DLL'
'Normal3f_DLL' gl.[]NA'OpenGL32.DLL.C32|glNormal3f F4 F4 F4'
:EndIf
z := Normal3f_DLL x
This doesn't work, but I can write
'gl' []IC 'Normal3f_DLL' gl.[]NA'OpenGL32.DLL.C32|glNormal3f F4 F4 F4'
Can I do better than this? Is there any advantage to having named instances?
