Symbian3/PDK/Source/GUID-4C31BFCC-BC2A-55B1-8D3B-3355032E2062.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 16:16:55 +0100
changeset 6 43e37759235e
parent 5 f345bda72bc4
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of example code"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-4C31BFCC-BC2A-55B1-8D3B-3355032E2062" xml:lang="en"><title>autoload</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p><userinput>autoload [ {+|-}UXmt ] [ -wkz ] [ name ... ]</userinput> </p>
<p>Equivalent to functions <codeph>-u</codeph>, with the exception of <codeph>-X</codeph> /<codeph>+X</codeph>, <codeph>-w</codeph>, <codeph>-k</codeph> and <codeph>-z</codeph>. </p>
<table id="GUID-9C277500-94BE-5D0D-8F4F-ACBDA3B7FBB6">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<tbody>
<row>
<entry><p> <codeph>-X</codeph>  </p> </entry>
<entry><p>Can be used only inside a shell function, and may not be followed
by a name. It causes the calling function to be marked for autoloading and
then immediately loaded and executed, with the current array of positional
parameters as arguments. This replaces the previous definition of the function.
If no function definition is found, an error is printed and the function remains
undefined and marked for autoloading. </p> </entry>
</row>
<row>
<entry><p> <codeph>+X</codeph>  </p> </entry>
<entry><p>Attempts to load each name as an autoloaded function, but does not
execute it. The exit status is zero (success) if the function was not previously
defined and a definition for it was found. This does not replace any existing
definition of the function. The exit status is nonzero (failure) if the function
was already defined or when no definition was found. In the latter case the
function remains undefined and marked for autoloading. </p> <p>It can also
be combined with either <codeph>-k</codeph> or <codeph>-z</codeph> to make
the function be loaded using <codeph>ksh-style</codeph> or <codeph>zsh-style</codeph> autoloading,
respectively. If neither is given, the current setting of the <codeph>KSH_AUTOLOAD </codeph> options
determines how the function is loaded. With <codeph>ksh-style</codeph> autoloading,
the contents of the file will not be executed immediately. Instead, the function
created will contain the contents of the file plus a call to the function
itself appended to it, thus given normal <codeph>ksh</codeph> autoloading
behaviour on the first call to the function. </p> </entry>
</row>
</tbody>
</tgroup>
</table>
<p> <b>Note:</b> The Symbian platform does not support the use
of <codeph>-w</codeph> option. </p>
</conbody></concept>