{{fbdoc item="title" value="MKLONGINT"}}----
Does a binary copy from a ##[[KeyPgLongint|longint]]## variable to a ##[[KeyPgString|string]]##, setting its length to 8 bytes

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Mklongint** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgLongint|longint]] ) [[KeyPgAs|as]] [[KeyPgString|string]]
##
{{fbdoc item="usage"}}##
	//result// = **Mklongint**[$]( //number// )
##
{{fbdoc item="param"}}
	##//number//##
		A ##[[KeyPgLongint|longint]]## variable to binary copy to a ##[[KeyPgString|string]]##.

{{fbdoc item="ret"}}
	Returns a ##[[KeyPgString|string]]## with a binary copy of the ##[[KeyPgLongint|longint]]##.

{{fbdoc item="desc"}}
	Does a binary copy  from a ##[[KeyPgLongint|Longint]]## variable to a string, setting its length to 8 bytes. The resulting string can be read back to a longint by ##[[KeyPgCvlongint|Cvlongint]]##
	
	This function is useful to write numeric values to buffers without using a ##[[KeyPgType|Type]]## definition.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/strings/mklongint.bas"}}%%(freebasic)
dim a as longint, b as string
a = 4534
b = mklongint(a)
print a, cvlongint(b)
sleep
%%
{{fbdoc item="lang"}}
	- Not available in the //[[CompilerOptlang|-lang qb]]// dialect unless referenced with the alias ##**""__Mklongint""**##.
	- The string type suffix "$" is optional in the //[[CompilerOptlang|-lang fblite]]// dialect.
	- The string type suffix "$" is ignored in the //[[CompilerOptlang|-lang fb]]// dialect, warn only with the //[[CompilerOptw|-w suffix]]// compile option (or //[[CompilerOptw|-w pedantic]]// compile option).

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

{{fbdoc item="see"}}
	- ##[[KeyPgCvlongint|Cvlongint]]##

{{fbdoc item="back" value="CatPgString|String Functions"}}