<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>ISBINARY</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">ISBINARY</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Determines whether a value is stored as binary data. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
True, if the value is binary; False, otherwise.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Decision functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>IsBinary(value)
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
ToBinary, ToBase64, IsNumeric, YesNoFormat
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Parameters</span>
<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;!--- Create a string of all ASCII characters (32-255) 
     and concatenate them together. ---&gt;
&lt;cfset charData =&quot;&quot;&gt;
&lt;cfloop index=&quot;data&quot; from=&quot;32&quot; to=&quot;255&quot;&gt;
   &lt;cfset ch=chr(data)&gt;
   &lt;cfset charData=charData &amp; ch&gt;
&lt;/cfloop&gt;

&lt;b&gt;The following string is the concatenation of all characters (32 to 255) from 
the ASCII table.&lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;cfoutput&gt;#htmleditformat(charData)#&lt;/cfoutput&gt;
&lt;br&gt;&lt;br&gt;
&lt;!--- Create a Base 64 representation of this string. ---&gt;
&lt;cfset data64=toBase64(charData)&gt;
&lt;!--- Convert string to binary. ---&gt;
&lt;cfset binaryData=toBinary(data64)&gt;
&lt;!--- Check to see if it really is a binary value. ---&gt;
&lt;cfif IsBinary(binaryData)&gt;
    The binaryData variable is binary!&lt;br&gt;
&lt;/cfif&gt;
&lt;!--- Convert binary data back to Base 64. ---&gt;
&lt;cfset another64=toBase64(binaryData)&gt;
&lt;cfif Not IsBinary(another64)&gt;
    The another64 variable is NOT binary!&lt;br&gt;
&lt;/cfif&gt;
&lt;!--- Compare another64 with data64 to ensure that they are equal. ---&gt;
&lt;cfif another64 eq data64&gt;
   Base 64 representation of binary data is identical to the Base 64 
   representation of string data.
&lt;cfelse&gt;
   &lt;h3&gt;Conversion error.&lt;/h3&gt;
&lt;/cfif&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="VALUE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">VALUE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>Number or string</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
