Got "Sin(Extended):Extended; InternProc;", expected "" If I change tan into sin, I get the above error... I am at a loss after a few days, also... i could not find a way to change it by changing different types of variables... At a point, when I separated  it into a testfile, I could match the Extended:Extended part but not the InternProc    vs    Register part.. I am new to freepascal, but I do know some programming... ---------------------------------------------------------------------- PascalDragon · 2021-07-07 07:34 Functions like Sin and Cos are functions that don't exist as code, but are instead handled by the compiler thus you can't take their address. You'll need to wrap those functions into other functions so that you can pass the address of those instead. ---------------------------------------------------------------------- winni · 2021-07-07 08:09 You also could use sincos from the unit math. ---------------------------------------------------------------------- PascalDragon · 2021-07-07 11:25 Quote from: winni on July 07, 2021, 10:09:19 amYou also could use sincos from the unit math. Which does not have a compatible function signature and thus has essentially the same requirement, namely that the function needs to be wrapped. ---------------------------------------------------------------------- BobDog · 2021-07-07 14:32 Sin has an address in msvcrt.dll But I am sure it is of no practical use to you, just a curiosity. Also, you can get a pointer to Math unit functions, here sincos. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   program sine;   uses   math; function sine(x:double):double;cdecl external 'msvcrt.dll' name 'sin';function cosine(x:double):double;cdecl external 'msvcrt.dll' name 'cos';function Printf(mask : pchar):integer; cdecl; varargs; external 'msvcrt.dll' name 'printf';  type func=function(const d:double):double;type func2=procedure(a:single;var b:single;var c:single);varp:pointer;s,c:s ingle; begins:=0;c:=0;p:=@sine; printf('pointer from C runtime %p',p);writeln;writeln(func(p)(0.5));writeln(sin(0.5));writeln ;  p:=@cosine;printf('pointer from C runtime %p',p);writeln;writeln(fu nc(p)(0.5));writeln(cos(0.5));writeln; p:=@sincos;printf('pointer from Math unit %p',p);writeln;func2(p)(0.5,s,c);writeln(s);writeln(c);writeln('Press to end . . .');readln;end. ---------------------------------------------------------------------- JPasD · 2021-07-08 17:12 Thanks all Is posted on : https://www.rosettacode.org/wiki/Higher- order_functions#using_FreePascal_:_Higher- order_function_MAP_.2F_REDUCE_.28_FOLDL_.2F_FOLDR_.29_.2F_FILTER ---------------------------------------------------------------------- PascalDragon · 2021-07-09 07:00 Quote from: JPasD on July 08, 2021, 07:12:11 pmIs posted on : https://www.rosettacode.org/wiki/Higher- order_functions#using_FreePascal_:_Higher- order_function_MAP_.2F_REDUCE_.28_FOLDL_.2F_FOLDR_.29_.2F_FILTER At the top you write QuoteThe free and readable alternative at C/C++ speeds and then you use variants... Not a good idea. Variants will result in a performance loss compared to directly using Double or Single. You should probably use generic functions instead.