BinaryProcedureDecode (Stringlist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 1: Line 1:
<span style="font-size:120%"><b>Convert to String from Binary Format</b></span>
{{Template:Stringlist:BinaryProcedureDecode subtitle}}


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.
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.
Line 5: Line 5:
BinaryProcedureDecode is a member of the [[Stringlist class]].
BinaryProcedureDecode is a member of the [[Stringlist class]].


==BinaryProcedureDecode Syntax==
==Syntax==
<pre>
{{Template:Stringlist:BinaryProcedureDecode syntax}}
%string = %sl:BinaryProcedureDecode
===Syntax terms===
</pre>
 
===Syntax Terms===
<dl>
<dl>
<dt>%string<dd>This longstring is to contain the data in '''%sl'''.
<dt>%string<dd>This longstring is to contain the data in '''%sl'''.
Line 16: Line 13:
</dl>
</dl>


===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 ''[[Sirius Mods]]'' Version 6.7 and later.</ul>
<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 ''[[Sirius Mods]]'' Version 6.7 and later.</ul>



Revision as of 17:36, 31 December 2010

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.

BinaryProcedureDecode is a member of the Stringlist class.

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 (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.
  • The BinaryProcedureDecode method is available in Sirius Mods Version 6.7 and later.

Examples

BinaryProcedureDecode converts to a longstring 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