{{fbdoc item="title" value="PASCAL"}}----
Specifies a //Pascal//-style calling convention in a procedure declaration

{{fbdoc item="syntax"}}##
	[[KeyPgSub|Sub]] //name// **Pascal** [[[KeyPgOverload|Overload]]] [[[KeyPgAlias|Alias]] //"""alias"""//] ( //parameters// )
	[[KeyPgFunction|Function]] //name// **Pascal** [[[KeyPgOverload|Overload]]] [[[KeyPgAlias|Alias]] //"""alias"""//] ( //parameters// ) [ [[KeyPgByrefFunction|Byref]] ] [[KeyPgAs|as]] //return_type//
##
{{fbdoc item="desc"}}
	In procedure declarations, ##**Pascal**## specifies that a procedure will use the ##**Pascal**## calling convention. In the //Pascal// calling convention, any parameters are to be passed (pushed onto the stack) in the same order in which they are listed, that is, from left to right. The procedures need not preserve the ##EAX##, ##ECX## or ##EDX## registers, and must clean up the stack (pop any parameters) before it returns.
	
	##**Pascal**## is not allowed to be used with variadic procedure declarations (those with the last parameter listed as "##[[KeyPgDots|...]]##").
	
	##**Pascal**## is the default calling convention for procedures in Microsoft ""QuickBASIC"", and is the standard convention used in the Windows 3.1 API.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/procs/pascal.bas"}}%%(freebasic)
Declare Function MyFunc pascal Alias "MyFunc" (MyParm As Integer) As Integer
%%

{{fbdoc item="diff"}}
	- New to ""FreeBASIC""

{{fbdoc item="see"}}
	- ##[[KeyPgCdecl|Cdecl]]##, ##[[KeyPgStdcall|Stdcall]]##
	- ##[[KeyPgDeclare|Declare]]##
	- ##[[KeyPgSub|Sub]]##, ##[[KeyPgFunction|Function]]##

{{fbdoc item="back" value="CatPgProcedures|Procedures"}}