<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Swift-user] Writing to an output file</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>I talked to Mike, got things fixed, and all is well.<BR>
<BR>
thank you,<BR>
Sincerely,<BR>
Erin<BR>
<BR>
<BR>
Erin M. Hodgess, PhD<BR>
Associate Professor<BR>
Department of Computer and Mathematical Sciences<BR>
University of Houston - Downtown<BR>
mailto: hodgesse@uhd.edu<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Mihael Hategan [<A HREF="mailto:hategan@mcs.anl.gov">mailto:hategan@mcs.anl.gov</A>]<BR>
Sent: Thu 6/4/2009 4:34 PM<BR>
To: Hodgess, Erin<BR>
Cc: swift-user@ci.uchicago.edu<BR>
Subject: Re: [Swift-user] Writing to an output file<BR>
<BR>
For most practical purposes, there are no side-effects in swift. "int x<BR>
= 0" means "For convenience, and for the current lexical scope, x will<BR>
be 0". It's the common (though reversed) "statement, where x = 0" from<BR>
math, except there is no "statement" in your case.<BR>
<BR>
Outside of "initialCondition" it doesn't mean anything. I'm not sure<BR>
what exactly the compiler is complaining about, but what you wrote<BR>
doesn't mean much.<BR>
<BR>
That plus what Mike said in his reply to this message.<BR>
<BR>
May I suggest expressing in simple words what you are trying to achieve?<BR>
>From that, it's easier to both translate to swift and for us to help<BR>
with that.<BR>
<BR>
Mihael<BR>
<BR>
On Thu, 2009-06-04 at 12:36 -0500, Hodgess, Erin wrote:<BR>
> Here is what SHOULD be a simple process.  I'm writing to an array, and<BR>
> sending that to an output file.  Here are the files and the results:<BR>
><BR>
> [erin@tp-login2 swift1]$ cat iter2.swift<BR>
> type file;<BR>
> <BR>
> app initialCondition() {<BR>
>         int x = 10;<BR>
> }<BR>
><BR>
>      int step[0]=initialCondition();<BR>
><BR>
> file o <"output.txt">;<BR>
><BR>
>         o=step[0];<BR>
> [erin@tp-login2 swift1]$ swift -tc.file tc.data iter2.swift<BR>
> Could not compile SwiftScript source: line 4:13: unexpected token: x<BR>
> [erin@tp-login2 swift1]$<BR>
><BR>
> The file is in /home/erin/swift1/iter2.swift.<BR>
><BR>
> Thanks,<BR>
> Erin<BR>
><BR>
><BR>
><BR>
> Erin M. Hodgess, PhD<BR>
> Associate Professor<BR>
> Department of Computer and Mathematical Sciences<BR>
> University of Houston - Downtown<BR>
> mailto: hodgesse@uhd.edu<BR>
><BR>
><BR>
><BR>
> _______________________________________________<BR>
> Swift-user mailing list<BR>
> Swift-user@ci.uchicago.edu<BR>
> <A HREF="http://mail.ci.uchicago.edu/mailman/listinfo/swift-user">http://mail.ci.uchicago.edu/mailman/listinfo/swift-user</A><BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>