Project

General

Profile

Returnex » History » Version 1

Per Amundsen, 02/14/2014 03:19 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
alias example {
17
  ;Prints 9: <space>A<space><space>B<space><space>C<space>.
18
  echo -a $len($preserve_space)
19
 
20
  ;Prints 5: A<space>B<space>C.
21
  echo -a $len($strip_space)
22
}
23
 
24
;Return with the spaces intact.
25
alias preserve_space returnex $get_abc
26
 
27
;Collaps spaces.
28
alias strip_space return $get_abc
29
 
30
;Just an example string "<space>A<space><space>B<space><space>C<space>".
31
alias get_abc returnex $+($chr(32), A, $chr(32), $chr(32), B, $chr(32), $chr(32), C, $chr(32))
32
</pre>