I tried to change the returned type by sgn in gas32 to long to be homogeneous but too complicated for a very small benefit.
Now sgn in gas64 uses direct asm code instead a function call, except for floats, and returning an integer is more efficient.
So updating the documentation is the 'best' solution.
@fxm
When helping demosthenesk to use Newt library (a C library) I struggled to find the valid alias for a function.
The example of declare for a sub without any parameter is to simple.
I suggest to add something like that :
Extracted from manual, page Alias (Modifier) :
Alias modifies the data type name mangling (decoration) of a public symbol
Alias "modifier", when specified following a data type, gives an alternate meaning to the data type, which may be needed for linking with languages other than FreeBASIC.
what I understand, it's only if you compile a module for a future use with C++ not for a use in FB code.
"Public symbol names are mangled (decorated) to encode information about the data type that is used for the symbol. When linking with the c language, the special meaning of the alias modifier is meaningless, since the extra information is not encoded in to the public name. When linking with the c++ language, typically more information is encoded in to the public symbol, and the alias modifier may be required. The public name is written to the compiled object file, and used by the linker to match symbol names from one object module to another."
Equivalent to declare sub nameinfb alias "NameinCpp" ()
In the fb code you use nameinfb and the linker use NameinCpp