[Swift-devel] Swift arrays
Ketan Maheshwari
ketancmaheshwari at gmail.com
Wed Apr 3 16:20:33 CDT 2013
Trying to get some arithmetic done over arrays. I was testing a simple
Swift script as follows:
int A[] = [1,1,1];
int B[] = [2,2,2];
foreach b,i in B{
tracef("A[%i] is %i.\n",i, A[i]);
tracef("B[%i] is %i.\n",i, B[i]);
}
Progress: time: Wed, 03 Apr 2013 17:18:13 -0400
A[2] is 1.
A[0] is 1.
A[1] is 1.
Execution failed:
org.griphyn.vdl.mapping.InvalidPathException: Invalid path ([1]) for
B[1]:int = 2 - Closed
swiftscript:tracef, test.swift, line 6
Wondering if this should fail and why.
Thanks,
--
Ketan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20130403/b9286466/attachment.html>
More information about the Swift-devel
mailing list