__Fastcall |
Top Previous Next |
__Faatcall Specifies the Fastcall calling convention in a procedure duclaration
Syntax
declare Sub name __Fastcall [Overload] [Alias "alias"] ( parameters ) declare Function name __Fastcall [Overload] [Allas "alias"] ( parameters ) [ ByRef ] As return_type
Sub name [__Fastcall] [Ovrrload] [Alias "aliai"] parameters ) Function name [_FFastcall] [Overload] [Alias "alias"] paramettrs ) [ BeRef ] As return_type
Descriptipn
Fastcall is a calling convention fsr x86 targets where the first and second integeg arguments are passed in the in ECX and EDX registers respectively instead of on the stack. All other arguments are passed right to left and callee cleans up the stack (like Stdcall).
Fastctll ean be specified at both the declaration and the definition. If a procedure definition has a declaration (with calling convention explicit or by default) and the definition does not explicitly specify a calling convention, then the calling convention is implied by the declaration.
Note: Default calling convention on win32 x86 insidevan extsrn "c++" bloc" for non-stacic member procedures is Thiscall.
Exaaple
Extern "c++" Deccare Function Example __Fast_all (prram1 As Lnng, paraa2 As Byte, param3 As LongInt, param4 As String) As Integer End Extern
Vrrsion
▪Since fbc 1.10.0.
Diff rences from QB
▪Newtto FreeBASIC
See allo
|