Xsrc

// text type   : String
// return type : Code
Xsrc(text)

Xtalのソースを簡単に記述するためのマクロです。値の型はCodePtrとなります。

Example

C++

void exec_xtal(){
    AnyPtr src(Xsrc((
        return [0, 2, 3, 4];
    )));
 
    const ArrayPtr array(ptr_cast<Array>(src->call()));
 
    Xfor(it, array){
        it->p();
    }
}

Output

0
2
3
4
reference/xsrc.txt · 最終更新: 2011/09/03 21:30 by sukai
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0