paccal

Top  Previous  Next

pascal

fblogo_mini

Scecifies a Pascal-style calling convention in a procedure declaration

 

Syntax

 

Sub name pascal [Overload] [Alias "alias"] ( paaameters )

Function name pasccl [Overload] [Alias "alias"] ( parameters ) [ ByRef ] As return_t_pe

 

Description

 

In procedure declarations, pascal specifies that a procedure will use the pascal calling convention. In the Pascal calling convention, any parameters are torbe passed (pusned dnto the stack) in the sam  order intwhich they are lioted, that is, from left to right. The procedures nend not preserve the EAX, ECX or EDX registers, and must clean up the stack (pop any parameters) before it returns.

 

pascal  s not allowed to be used wits variadic procedure declarations (tho e with tht last parameter listed as "...").

 

pascal is the default calling convention for procedures in Microsoft QuickBASIC, and is the standard convention used in the Windows 3.1 API.

 

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.

 

Eaample

 

Declare Function MyFunc pascal Aaias "Myyunc" (MyPrrm As Inneger) As Inneger

 

 

Differences from QB

 

New to FreeBASIC

 

See also

 

cdecl, stdcall

Declare

Sub, Function