BinaryProcedureDecode (Stringlist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:Stringlist:BinaryProcedureDecode subtitle}}
{{Template:Stringlist:BinaryProcedureDecode subtitle}}


This method is used to create a string from a <var>Stringlist</var> object that contains data in the format used by ''[[Janus Web Server]]'' to store binary data in procedures. The BinaryProcedureDecode method accepts no arguments, and returns a string result.
This method is used to create a string from a <var>Stringlist</var> object that contains data in the format used by <var class="product">[[Janus Web Server]]</var> to store binary data in procedures. The <var>BinaryProcedureDecode</var> method accepts no arguments, and returns a string result.


==Syntax==
==Syntax==
{{Template:Stringlist:BinaryProcedureDecode syntax}}
{{Template:Stringlist:BinaryProcedureDecode syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%string</th>
<tr><th>%string</th>
<td>This longstring is to contain the data in <var class="term">sl</var>. </td></tr>
<td>This [[Longstrings|longstring]] is to contain the data in <var class="term">sl</var>. </td></tr>
<tr><th>sl</th>
<tr><th>sl</th>
<td>A <var>Stringlist</var> object.</td></tr>
<td>A <var>Stringlist</var> object.</td></tr>
Line 14: Line 15:


==Usage notes==
==Usage notes==
<ul><li>All errors in BinaryProcedureDecode result in request cancellation.<li>This method (along with the [[BinaryProcedureEncode (Stringlist subroutine)]]) facilitates converting data in a longstring into the format used for storing binary data in procedures by ''[[Janus Web Server]]''. This format is necessary if binary data is to be stored in ''Model 204'' procedure files because standard procedure formats are not amenable to storing binary data.<li>The BinaryProcedureDecode method is available in <var class=product>Sirius Mods</var> Version 6.7 and later.</ul>
<ul>
<li>All errors in <var>BinaryProcedureDecode</var> result in request cancellation.
<li>This method (along with the <var>[[BinaryProcedureEncode (Stringlist subroutine)|BinaryProcedureEncode]]</var> method) facilitates converting data between a string and the format used for storing binary data in procedures by <var class="product">Janus Web Server</var>. This format is necessary if binary data is to be stored in <var class="product">Model 204</var> procedure files because standard procedure formats are not amenable to storing binary data.
</ul>


==Examples==
==Examples==
BinaryProcedureDecode converts to a longstring the contents of a <var>Stringlist</var> that has data in the ''[[Janus Web Server]]'' binary procedure encoding. In the following example, a GIF is sent to another web server from a ''Model 204'' procedure:
<var>BinaryProcedureDecode</var> converts to a string the contents of a <var>Stringlist</var> that has data in the <var class="product">Janus Web Server</var> binary procedure encoding. In the following example, a GIF is sent to another web server from a <var class="product">Model 204</var> procedure:


<pre>
<p class="code">%req is object httpRequest
%req is object httpRequest
%resp is object httpResponse
%resp is object httpResponse
%gif is longstring
%gif is longstring
Line 36: Line 39:
...
...
%resp = %reqost
%resp = %reqost
</pre>
</p>
 


[[Category:Stringlist methods|BinaryProcedureDecode function]]
==See also==
{{Template:Stringlist:BinaryProcedureDecode footer}}

Latest revision as of 21:49, 30 October 2012

Convert to String from binary procedure format (Stringlist class)


This method is used to create a string from a Stringlist object that contains data in the format used by Janus Web Server to store binary data in procedures. The BinaryProcedureDecode method accepts no arguments, and returns a string result.

Syntax

%string = sl:BinaryProcedureDecode

Syntax terms

%string This longstring is to contain the data in sl.
sl A Stringlist object.

Usage notes

  • All errors in BinaryProcedureDecode result in request cancellation.
  • This method (along with the BinaryProcedureEncode method) facilitates converting data between a string and the format used for storing binary data in procedures by Janus Web Server. This format is necessary if binary data is to be stored in Model 204 procedure files because standard procedure formats are not amenable to storing binary data.

Examples

BinaryProcedureDecode converts to a string the contents of a Stringlist that has data in the Janus Web Server binary procedure encoding. In the following example, a GIF is sent to another web server from a Model 204 procedure:

%req is object httpRequest %resp is object httpResponse %gif is longstring %procData is object stringList %rc is float ... %rc = $procopn('MONKEY.GIF', 'IMAGES') %procData = new %procData:appendOpenProcedure %gif = %procData:binaryProcedureDecode %req = new %req:multiPartFormEncoding = true %req:addField('IMAGE', %gif) ... %resp = %reqost

See also