[Swift-devel] New syntax for appending to arrays
Mihael Hategan
hategan at mcs.anl.gov
Tue Jun 28 13:53:02 CDT 2011
On Wed, 2011-06-29 at 00:00 +0530, Yadu Nand wrote:
> > Well, don't. Make it generate something else, like path=getThreadIndex()
> > instead of path="_SWIFT_AUTO_INCREMENT".
> I don't understand this clearly. I am generating kml with say, _AUTO_INC
> just so that, function parsePath in VDLFuntion.java can identify and add
> the thread prefix id to the end of the path instead of _AUTO_INC .
Right. I'm not sure how exactly this ends up looking like in kml, but I
suspect something like:
...
<getFieldSubscript>
<argument name="var"><variable>a</variable></argument>
<argument name="subscript"><string>_AUTO_INC</string></argument>
</getFieldSubscript>
This is the standard translation.
I suggest:
<getFieldSubscript>
<argument name="var"><variable>a</variable></argument>
<argument name="subscript"><autoIndex/></argument>
</getFieldSubscript>
Where <autoIndex/> is a karajan function that returns the thread index.
Let me know if you need help implementing <autoIndex/>, but you should
be able to figure it out if you take a look at libexec/vdl-lib.xml
More information about the Swift-devel
mailing list