aa_macro syntax 
 aa_macro source 
 HTML source 
 HTML render 
Key

4.99 - [split] Built-In

Mnemonic aid: split for SPLIT

See also:  [splash]  and  [splitcount] 

This built-in takes content and splits it for retrieval using the  [parm]  built-in. The idea is that for some styles, you will want to pass more than one parameter.  [split]  takes a separator parameter X, and then the content to be split. You can specify anything you like as the separator, although to use a comma, you must use the comma escape,  [co] 

Tip:

After the  [split]  operation has run, you can retrieve the number of parameters that were created as current  [parm]  values from the local variable loc_splitcount. Be aware that there may be content in  [parm] s that are outside of the set that were retrieved in the current operation. For instance, if loc_splitcount is 3, then the  [parm] s that will be set by the most recent  [split]  are 0, 1 and 2 — but there may be older content in 3 and 4 and so on.

Tip:

See also the  [splash]  built-in. It may do what you want with fewer operations.


[split X,item(Xitem)]

[split |,ben|larry|joe]
The last split produced [v loc_splitcount] parameters
[parm 2]
[parm 1]
[parm 0]

[style disp [parm [b]] ]
[split |,grapes|oranges|cherries|passionfruit|tomatoes|raspberries]
[for disp,0,[v loc_splitcount],1]

[split [co],Sheila,Michelle,Shevaughn]
[parm 2]
[parm 1]
[parm 0]

[splitcount 2]
[split [co],Jim,Becky Thatcher,Tom Sawyer, and Huckleberry Finn]
[parm 0]
[parm 1]
[parm 2]

The last split produced 3 parameters
joe
larry
ben

grapes oranges cherries passionfruit tomatoes raspberries

Shevaughn
Michelle
Sheila

Jim
Becky Thatcher
Tom Sawyer, and Huckleberry Finn
The last split produced 3 parameters joe larry ben grapes oranges cherries passionfruit tomatoes raspberries Shevaughn Michelle Sheila Jim Becky Thatcher Tom Sawyer, and Huckleberry Finn

Other built-ins used here:  [co] ,  [for] ,  [parm] ,  [parm] ,  [splitcount] ,  [style]  and  [v] 

Keyboard Navigation
, Previous Page . Next Page t TOC i Index

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7