Skip to content
This repository
Newer
Older
100644 68 lines (59 sloc) 2.154 kb
ed28a01d » docelic
2005-03-08 Rolling the stone slowly..
1 __NAME__ purpose
c6c4dc1a » docelic
2005-11-19 - ran glossary entries and reference pages through a spellchecker aspell
2 evaluate the enclosed arithmetic expression or Perl block
ed28a01d » docelic
2005-03-08 Rolling the stone slowly..
3 __END__
4
5 __NAME__ synopsis
6 &ROW_INTERPOLATE_1;
7 &ROW_REPARSE_1;
8 __END__
c083ee0e » docelic
2005-02-02 - Makefile: added programming-style guide
9
10 __NAME__ see also
11 calc, mvasp, perl
12 __END__
13
ed28a01d » docelic
2005-03-08 Rolling the stone slowly..
14 __NAME__ description
15 The tag evaluates the enclosed arithmetic expression or a &PERL; block.
16 The last expression evaluated (return value) is returned to the client
17 page.
18 </para><para>
19 Note that Perl blocks can be of arbitrary content and complexity, and there
20 really are no typical examples to show.
21 __END__
22 TODO note about safe, note about doc on Perl programming within IC
23
24
c083ee0e » docelic
2005-02-02 - Makefile: added programming-style guide
25 __NAME__ notes
26 <!-- if you change this, also change the same in refs/perl -->
27 The &tag-calc; tag is lower-overhead variant of &tag-perl;, because it
ed28a01d » docelic
2005-03-08 Rolling the stone slowly..
28 does not accept arguments, does not try to interpolate tag body (well,
29 &tag-calcn; tag only) , does not
c083ee0e » docelic
2005-02-02 - Makefile: added programming-style guide
30 pre-open any database tables, and it doesn't do any extra wrapping.
31 </para><para>
32 The &tag-calc; tag will remember variable values inside the page, so you
33 can do the equivalent of a memory store and memory recall for a loop. In
34 other words, variables you initialize or set in one &tag-calc; block are
35 also visible in all further &tag-calc; blocks on the same page.
36 </para><para>
37 There is no reason to ever use this tag inside &tag-perl; or &tag-mvasp;.
ed28a01d » docelic
2005-03-08 Rolling the stone slowly..
38 </para><para>
39 &tag-calc; and &tag-perl; are the two tags that play major role in any
40 &PERL; programming within &IC;.
c083ee0e » docelic
2005-02-02 - Makefile: added programming-style guide
41 __END__
ed28a01d » docelic
2005-03-08 Rolling the stone slowly..
42
43 __NAME__ example: Simple Perl code, a random arithmetic expression
44 <programlisting>
45 Current magic number is: [calc]2+rand[/calc]
46 </programlisting>
47 __END__
48
49 __NAME__ example: Retrieving an Interchange session value
50 <programlisting>
51 Welcome, your user name is [calc]$Tag->data(qw/session username/)[/calc]
52 </programlisting>
53 __END__
54
55 __NAME__ example: Setting and displaying a value
56 <programlisting>
57 Order number is:
58 [calc] $Session->{mv_order_number} = $Values->{mv_order_number} [/calc]
59 </programlisting>
60 __END__
61
62 __NAME__ example: Clearing the return value
63 You can clear the return value (that is, return nothing) by simply calling
64 <code>return</code> with no arguments:
65 <programlisting>
66 [calc] my $a = 5; return [/calc]
67 </programlisting>
68 __END__
69
Something went wrong with that request. Please try again.