<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.avisynth.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CoRoNe</id>
	<title>Avisynth wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.avisynth.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=CoRoNe"/>
	<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php/Special:Contributions/CoRoNe"/>
	<updated>2026-08-04T00:31:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Internal_functions/Conversion_functions&amp;diff=1621</id>
		<title>Internal functions/Conversion functions</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Internal_functions/Conversion_functions&amp;diff=1621"/>
		<updated>2013-06-30T17:03:07Z</updated>

		<summary type="html">&lt;p&gt;CoRoNe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Conversion functions ==&lt;br /&gt;
&lt;br /&gt;
These functions convert between different types. There are also some [[Internal_functions/Numeric_functions|numeric functions]] that can be classified in this category, namely: &amp;lt;tt&amp;gt;Ceil, Floor, Float, Int&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Round&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Value|v2.07|Value(string)}}&lt;br /&gt;
: Converts a decimal string to its associated numeric value.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Value (&amp;quot;-2.7&amp;quot;) = -2.7&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|HexValue|v2.07|HexValue(string)}}&lt;br /&gt;
: Converts a hexadecimal string to its associated numeric value. &lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 HexValue (&amp;quot;FF00&amp;quot;) = 65280&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Hex|v2.60|Hex(int)}}&lt;br /&gt;
: Converts a numerical value to its hexadecimal value. See [[Colors]] for more information on specifying colors.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Hex (10824234) = &amp;quot;A52A2A&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|String|v2.07|String(float / int [, string format_string])}}&lt;br /&gt;
: Converts a variable to a string. &lt;br /&gt;
: If the variable is float or integer, it first converts it to a float and then uses format_string to convert the float to a string. The syntax of format_string is as follows:&lt;br /&gt;
: &amp;lt;tt&amp;gt;%[flags][width][.precision]f&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &#039;&#039;flags&#039;&#039;:&lt;br /&gt;
:: &amp;lt;tt&amp;gt;-  &amp;lt;/tt&amp;gt; left align (instead right align)&lt;br /&gt;
:: &amp;lt;tt&amp;gt;+  &amp;lt;/tt&amp;gt; always print the +/- sign&lt;br /&gt;
:: &amp;lt;tt&amp;gt;0  &amp;lt;/tt&amp;gt; padding with leading zeros&lt;br /&gt;
:: &amp;lt;tt&amp;gt;&#039; &#039;&amp;lt;/tt&amp;gt; print a blank instead of a &amp;quot;+&amp;quot;&lt;br /&gt;
:: &amp;lt;tt&amp;gt;#  &amp;lt;/tt&amp;gt; always print the decimal point&lt;br /&gt;
: &#039;&#039;width&#039;&#039;: the minimum width (the string is never truncated)&lt;br /&gt;
: &#039;&#039;precision&#039;&#039;: the number of digits printed&lt;br /&gt;
: You can also put arbitrary text around the format_string as defined above, similar to the C-language &#039;&#039;printf&#039;&#039; function.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 [[Subtitle]]( &amp;quot;Clip height is &amp;quot; + String(last.height) )&lt;br /&gt;
 [[Subtitle]]( String(x, &amp;quot;Value of x is %.3f after AR calc&amp;quot;) )&lt;br /&gt;
 [[Subtitle]]( &amp;quot;Value of x is &amp;quot; + String(x, &amp;quot;%.3f&amp;quot;) + &amp;quot; after AR calc&amp;quot;) ) # same as above&lt;br /&gt;
 String(1.23, &amp;quot;%f&amp;quot;) = &#039;1.23&#039;&lt;br /&gt;
 String(1.23, &amp;quot;%5.1f&amp;quot;) = &#039;  1.2&#039;&lt;br /&gt;
 String(1.23, &amp;quot;%1.3f&amp;quot;) = &#039;1.230&#039;&lt;br /&gt;
 String(24, &amp;quot;%05.0f&amp;quot;) = &#039;00024&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[Internal functions]].&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Basics]]&lt;/div&gt;</summary>
		<author><name>CoRoNe</name></author>
	</entry>
</feed>