SetSession (Object subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
m (misc formatting)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:Object:SetSession subtitle}}
{{Template:Object:SetSession subtitle}}


This page is [[under construction]].
==Syntax==
==Syntax==
{{Template:Object:SetSession syntax}}
{{Template:Object:SetSession syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th nowrap="true"><var>%(Object)</var></th>
<tr><th nowrap="true"><var>%(Object)</var></th>
<td>The class name in parentheses denotes a shared method. <var>SetSession</var> can also be invoked via a <var>Object</var> object variable, which may be <var>Null</var>.</td></tr>
<td>The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared method]]. <var>SetSession</var> can also be invoked via an <var>Object</var> class object variable, which may be <var>Null</var>.</td></tr>
 
<tr><th>name</th>
<tr><th>name</th>
<td>string</td></tr>
<td>A string that specifies the session name. </td></tr>
 
<tr><th>source</th>
<tr><th>source</th>
<td><var>Object</var> object</td></tr>
<td>This <var>Object</var> class object variable is set by <var>SetSession</var> to be referenced by the session name <var class="term">name</var>.
<p>
<var class="term">source</var> can be a %variable, a structure member, or a class member inside an object.
</p></td></tr>
</table>
</table>
==Usage notes==
 
==Examples==
==Examples==
The following fragment creates a session called <code>GROUCHO</code> followed by a timestamp, then sets a cookie for a web application so that the session can be easily located on subsequent web requests.
<p class="code">%sesid = 'GROUCHO' WITH $SirTime
%rc = $Session_Create(%sesid, , 3600)
%rc = $Web_Set_Cookie('SESID', %sesid)
</p>
==See also==
==See also==
<ul>
<li><var>[[GetSession (Object subroutine)|GetSession]]</var> </li>
<li>[[Global and session objects]] </li>
</ul>
{{Template:Object:SetSession footer}}
{{Template:Object:SetSession footer}}

Latest revision as of 19:24, 11 July 2017

Set session object reference (Object class)


Syntax

%(Object):SetSession( name, source)

Syntax terms

%(Object) The class name in parentheses denotes a shared method. SetSession can also be invoked via an Object class object variable, which may be Null.
name A string that specifies the session name.
source This Object class object variable is set by SetSession to be referenced by the session name name.

source can be a %variable, a structure member, or a class member inside an object.

Examples

The following fragment creates a session called GROUCHO followed by a timestamp, then sets a cookie for a web application so that the session can be easily located on subsequent web requests.

%sesid = 'GROUCHO' WITH $SirTime %rc = $Session_Create(%sesid, , 3600) %rc = $Web_Set_Cookie('SESID', %sesid)

See also