{{fbdoc item="title" value="MKS"}}----
Does a binary copy from a ##[[KeyPgSingle|single]]## variable to a ##[[KeyPgString|string]]##, setting its length to 4 bytes

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

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

{{fbdoc item="desc"}}
	Does a binary copy  from a ##[[KeyPgSingle|Single]]## variable to a ##[[KeyPgString|string]]##, setting its length to 4 bytes. The resulting string can be read back to a ##[[KeyPgSingle|single]]## by ##[[KeyPgCvs|Cvs]]##.
	
	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/mks.bas"}}%%(freebasic)
dim n as single, e as string
n = 1.2345
e = mks(n)
print n, cvs(e)
%%

{{fbdoc item="lang"}}
	- The string type suffix "$" is obligatory in the //[[CompilerOptlang|-lang qb]]// dialect.
	- The string type suffix "$" is optional in the //[[CompilerOptlang|-lang fblite]]// dialect.
	- The string type suffix "$" is forbidden in the //[[CompilerOptlang|-lang fb]]// dialect.

{{fbdoc item="diff"}}
	-None

{{fbdoc item="see"}}
	- ##[[KeyPgMki|Mki]]##
	- ##[[KeyPgMkl|Mkl]]##
	- ##[[KeyPgMks|Mks]]##
	- ##[[KeyPgCvd|Cvd]]##
	- ##[[KeyPgCvi|Cvi]]##
	- ##[[KeyPgCvl|Cvl]]##
	- ##[[KeyPgCvs|Cvs]]##

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