Project

General

Profile

Returnex » History » Version 2

Per Amundsen, 02/14/2014 03:26 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*/returnex [text]*
4
5
Halts a currently executing script and allows the calling routine to continue processing.
6
7
Same as [[/return]] but retains all spaces, including leading, trailing, and multiple.
8
9
*Parameters*
10
11
[text] - Text to return.
12
13
*Example*
14
15
<pre>
16 2 Per Amundsen
<code class="php">
17 1 Per Amundsen
alias example {
18
  ;Prints 9: <space>A<space><space>B<space><space>C<space>.
19
  echo -a $len($preserve_space)
20
 
21
  ;Prints 5: A<space>B<space>C.
22
  echo -a $len($strip_space)
23
}
24
 
25
;Return with the spaces intact.
26
alias preserve_space returnex $get_abc
27
 
28
;Collaps spaces.
29
alias strip_space return $get_abc
30
 
31
;Just an example string "<space>A<space><space>B<space><space>C<space>".
32
alias get_abc returnex $+($chr(32), A, $chr(32), $chr(32), B, $chr(32), $chr(32), C, $chr(32))
33 2 Per Amundsen
</code>
34 1 Per Amundsen
</pre>