2004-04-13 08:46:28 +00:00
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
|
|
|
|
<!-- $Revision$ -->
|
2004-10-02 12:49:29 +00:00
|
|
|
|
<!-- EN-Revision: 1.2 Maintainer: thomasgm Status: ready -->
|
2004-04-13 08:46:28 +00:00
|
|
|
|
<sect1 id="language.function.counter">
|
|
|
|
|
|
<title>counter</title>
|
|
|
|
|
|
<informaltable frame="all">
|
|
|
|
|
|
<tgroup cols="5">
|
|
|
|
|
|
<colspec colname="param" align="center" />
|
|
|
|
|
|
<colspec colname="type" align="center" />
|
|
|
|
|
|
<colspec colname="required" align="center" />
|
|
|
|
|
|
<colspec colname="default" align="center" />
|
|
|
|
|
|
<colspec colname="desc" />
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>Nome do Atributo</entry>
|
|
|
|
|
|
<entry>Tipo</entry>
|
2004-10-01 14:39:42 +00:00
|
|
|
|
<entry>Obrigat<EFBFBD>rio</entry>
|
2004-04-13 08:46:28 +00:00
|
|
|
|
<entry>Padr<EFBFBD>o</entry>
|
|
|
|
|
|
<entry>Descri<EFBFBD><EFBFBD>o</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>name</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>N<EFBFBD>o</entry>
|
|
|
|
|
|
<entry><emphasis>default</emphasis></entry>
|
|
|
|
|
|
<entry>O nome do contador</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>start</entry>
|
|
|
|
|
|
<entry>number</entry>
|
|
|
|
|
|
<entry>N<EFBFBD>o</entry>
|
|
|
|
|
|
<entry><emphasis>1</emphasis></entry>
|
2004-10-01 14:39:42 +00:00
|
|
|
|
<entry>O n<>mero no qual a contagem se inicia</entry>
|
2004-04-13 08:46:28 +00:00
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>skip</entry>
|
|
|
|
|
|
<entry>number</entry>
|
|
|
|
|
|
<entry>N<EFBFBD>o</entry>
|
|
|
|
|
|
<entry><emphasis>1</emphasis></entry>
|
2004-10-01 14:39:42 +00:00
|
|
|
|
<entry>O intervalo entre as contagens</entry>
|
2004-04-13 08:46:28 +00:00
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>direction</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>N<EFBFBD>o</entry>
|
|
|
|
|
|
<entry><emphasis>up</emphasis></entry>
|
|
|
|
|
|
<entry>A dire<72><65>o para contar (up/down)</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>print</entry>
|
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
|
<entry>N<EFBFBD>o</entry>
|
|
|
|
|
|
<entry><emphasis>true</emphasis></entry>
|
|
|
|
|
|
<entry>Quando mostrar ou n<>o o valor</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>assign</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>N<EFBFBD>o</entry>
|
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
|
<entry>A vari<72>vel de template que vai
|
|
|
|
|
|
receber a sa<73>da</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</tgroup>
|
|
|
|
|
|
</informaltable>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
counter <20> usada para mostrar uma contagem. counter ir<69> se lembrar de
|
|
|
|
|
|
count em cada intera<72><61>o. Voc<6F> pode ajustar o n<>mero, o intervalo
|
|
|
|
|
|
e a dire<72><65>o da contagem, assim como detrminar quando
|
2004-10-01 14:39:42 +00:00
|
|
|
|
mostrar ou n<>o a contagem. Voc<6F> pode ter v<>rios contadores ao
|
2004-04-13 08:46:28 +00:00
|
|
|
|
mesmo tempo, dando um nome <20>nico para cada um. Se voc<6F> n<>o der um nome,
|
|
|
|
|
|
o nome 'default' ser<65> usado.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
Se voc<6F> indicar o atributo especial "assign", a sa<73>da da fun<75><6E>o counter
|
2004-10-01 14:39:42 +00:00
|
|
|
|
ser<65> passada para essa vari<72>vel de template ao inv<6E>s de
|
2004-04-13 08:46:28 +00:00
|
|
|
|
ser mostrada no template.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>counter</title>
|
|
|
|
|
|
<programlisting>
|
2004-10-01 14:39:42 +00:00
|
|
|
|
<![CDATA[
|
2004-04-13 08:46:28 +00:00
|
|
|
|
{* inicia a contagem *}
|
|
|
|
|
|
{counter start=0 skip=2 print=false}
|
|
|
|
|
|
|
2004-10-01 14:39:42 +00:00
|
|
|
|
{counter}<br>
|
|
|
|
|
|
{counter}<br>
|
|
|
|
|
|
{counter}<br>
|
|
|
|
|
|
{counter}<br>
|
2004-04-13 08:46:28 +00:00
|
|
|
|
|
|
|
|
|
|
MOSTRA:
|
|
|
|
|
|
|
2004-10-01 14:39:42 +00:00
|
|
|
|
2<br>
|
|
|
|
|
|
4<br>
|
|
|
|
|
|
6<br>
|
|
|
|
|
|
8<br>
|
|
|
|
|
|
]]>
|
|
|
|
|
|
</programlisting>
|
2004-04-13 08:46:28 +00:00
|
|
|
|
</example>
|
|
|
|
|
|
</sect1>
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
|
|
Local variables:
|
|
|
|
|
|
mode: sgml
|
|
|
|
|
|
sgml-omittag:t
|
|
|
|
|
|
sgml-shorttag:t
|
|
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
|
|
sgml-indent-step:1
|
|
|
|
|
|
sgml-indent-data:t
|
|
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
|
|
sgml-parent-document:nil
|
|
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
|
|
End:
|
|
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
|
|
-->
|