Help on Help

Started by Nicola_Piano, December 12, 2021, 11:57:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nicola_Piano

@Charles Pegge 

Charles, can you tell me something more about "NOSIG" and could you post some examples of use?
Thank you

Charles Pegge

Hi Nicola,
'nosig' allows a procedure to accept any parameters. This can be useful for providing a kind of polymorphism. Supposing you have a function that processes floats, but the variables you are using are UDT types, containing floats:

type VectorXYZ
  float x,y,z
end type

type matrix4x4
  float col1[4]
  float col2[4]
  float col3[4]
  float col4[4]
end type

function f(float*v, int n) nosig
  ...
  print "f ok"
end function

float x[1000]
f(@x[31],4)

vectorXYZ v[100]
f(@v[10],3)

matrix4x4 m[100]
f(@m[10],16)

Nicola_Piano

Hi Charles,
Thanks for the explanation.
I entered in the help this keyword and the related example.