Loading ...
Sorry, an error occurred while loading the content.
 

Expand Messages
  • Hermann Wellenstein
    From: wellenst@brandeis.edu Subject: Date: August 28, 2008 2:04:10 PM EDT To: chipmunkbasicforum@yahoogroups.com Help! I have a G4 mac with OSX 10.0.11.
    Message 1 of 11 , Aug 28, 2008
      From: wellenst@...
      Subject:
      Date: August 28, 2008 2:04:10 PM EDT
      To: chipmunkbasicforum@yahoogroups.com

      Help!

      I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk Basic and
      wrote a little program but cannot open or print into files. Do I
      need SimpleText. How can I get it?

      Thanks,
      Hermann



      [Non-text portions of this message have been removed]
    • Justin T Fanning
      Hi Hermann, I m not 100% clear on what it is you are trying to do, but I ll give it a go. You open file to read like this: open /your-path/goes/here/my-
      Message 2 of 11 , Sep 13, 2008
        Hi Hermann,

        I'm not 100% clear on what it is you are trying to do, but I'll give
        it a go.

        You open file to read like this: open "/your-path/goes/here/my-
        file.txt" for input as #1
        You can then read like this: input #1,a$

        You open for writing almost the same way: open "/your-path/goes/here/
        my-file.txt" for output as #1
        You can then write like this: print #1,a$

        ... If this isn't what you needed could you expand?

        Kind regards,


        Justin


        ---


        On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:

        > From: wellenst@...
        > Subject:
        > Date: August 28, 2008 2:04:10 PM EDT
        > To: chipmunkbasicforum@yahoogroups.com
        >
        > Help!
        >
        > I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk Basic and
        > wrote a little program but cannot open or print into files. Do I
        > need SimpleText. How can I get it?
        >
        > Thanks,
        > Hermann
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >



        [Non-text portions of this message have been removed]
      • Hermann Wellenstein
        Hi Justin, Here is what I tried to run: without lines 10 and 167 it runs but I do not get a file. To copy and paste does not work as i need to run r = 1 to
        Message 3 of 11 , Sep 14, 2008
          Hi Justin,

          Here is what I tried to run:




          without lines 10 and 167 it runs but I do not get a file. To copy and
          paste does not work as i need to run r = 1 to 1000 and line 40 has to
          go from e = 1 to e = 10.



          Thank you,

          I hope you can help.

          -Hermann

          On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:

          >
          > Hi Hermann,
          >
          > I'm not 100% clear on what it is you are trying to do, but I'll give
          > it a go.
          >
          > You open file to read like this: open "/your-path/goes/here/my-
          > file.txt" for input as #1
          > You can then read like this: input #1,a$
          >
          > You open for writing almost the same way: open "/your-path/goes/here/
          > my-file.txt" for output as #1
          > You can then write like this: print #1,a$
          >
          > ... If this isn't what you needed could you expand?
          >
          > Kind regards,
          >
          > Justin
          >
          > ---
          >
          > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
          >
          > > From: wellenst@...
          > > Subject:
          > > Date: August 28, 2008 2:04:10 PM EDT
          > > To: chipmunkbasicforum@yahoogroups.com
          > >
          > > Help!
          > >
          > > I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk Basic and
          > > wrote a little program but cannot open or print into files. Do I
          > > need SimpleText. How can I get it?
          > >
          > > Thanks,
          > > Hermann
          > >
          > > [Non-text portions of this message have been removed]
          > >
          > >
          > >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >



          [Non-text portions of this message have been removed]
        • Justin T Fanning
          Hi Hermann, Thanks for the Email. If your code is not huge do you want to post it up, without seeing the code I can t really comment on line 10 , line 167
          Message 4 of 11 , Sep 17, 2008
            Hi Hermann,

            Thanks for the Email.

            If your code is not huge do you want to post it up, without seeing the
            code I can't really comment on "line 10", "line 167" etc.

            Thanks,


            Justin

            ---

            On 14 Sep 2008, at 17:47, Hermann Wellenstein wrote:

            >
            > Hi Justin,
            >
            > Here is what I tried to run:
            >
            > without lines 10 and 167 it runs but I do not get a file. To copy and
            > paste does not work as i need to run r = 1 to 1000 and line 40 has to
            > go from e = 1 to e = 10.
            >
            > Thank you,
            >
            > I hope you can help.
            >
            > -Hermann
            >
            > On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:
            >
            > >
            > > Hi Hermann,
            > >
            > > I'm not 100% clear on what it is you are trying to do, but I'll give
            > > it a go.
            > >
            > > You open file to read like this: open "/your-path/goes/here/my-
            > > file.txt" for input as #1
            > > You can then read like this: input #1,a$
            > >
            > > You open for writing almost the same way: open "/your-path/goes/
            > here/
            > > my-file.txt" for output as #1
            > > You can then write like this: print #1,a$
            > >
            > > ... If this isn't what you needed could you expand?
            > >
            > > Kind regards,
            > >
            > > Justin
            > >
            > > ---
            > >
            > > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
            > >
            > > > From: wellenst@...
            > > > Subject:
            > > > Date: August 28, 2008 2:04:10 PM EDT
            > > > To: chipmunkbasicforum@yahoogroups.com
            > > >
            > > > Help!
            > > >
            > > > I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk Basic and
            > > > wrote a little program but cannot open or print into files. Do I
            > > > need SimpleText. How can I get it?
            > > >
            > > > Thanks,
            > > > Hermann
            > > >
            > > > [Non-text portions of this message have been removed]
            > > >
            > > >
            > > >
            > >
            > > [Non-text portions of this message have been removed]
            > >
            > >
            > >
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >



            [Non-text portions of this message have been removed]
          • Hermann Wellenstein
            Hi Justin, Sorry I forgot to attach. 10 open electrons.txt for output as #1 20 for r = 1 to 100 40 e = 1 60 for f = 1 to 512 80 for n = 1 to e 100 if rnd(1)
            Message 5 of 11 , Sep 17, 2008
              Hi Justin,

              Sorry I forgot to attach.

              10 open "electrons.txt" for output as #1
              20 for r = 1 to 100
              40 e = 1
              60 for f = 1 to 512
              80 for n = 1 to e
              100 if rnd(1) < .01 then e=e+1
              120 next n
              140 next f
              160 print e
              167 print #1, e
              180 next r

              > > Here is what I tried to run:
              > >
              > > without lines 10 and 167 it runs but I do not get a file. To copy
              > and
              > > paste does not work as i need to run r = 1 to 1000 and line 40 has
              > to
              > > go from e = 1 to e = 10.

              in an additional for .... to ....

              > >
              > > Thank you,
              > >
              > > I hope you can help.
              > >
              > > -Hermann


              Is there any way to write into an excel file or is that asking for too
              much.. -h



              On Sep 17, 2008, at 5:48 AM, Justin T Fanning wrote:

              >
              > Hi Hermann,
              >
              > Thanks for the Email.
              >
              > If your code is not huge do you want to post it up, without seeing the
              > code I can't really comment on "line 10", "line 167" etc.
              >
              > Thanks,
              >
              > Justin
              >
              > ---
              >
              > On 14 Sep 2008, at 17:47, Hermann Wellenstein wrote:
              >
              > >
              > > Hi Justin,
              > >
              > > Here is what I tried to run:
              > >
              > > without lines 10 and 167 it runs but I do not get a file. To copy
              > and
              > > paste does not work as i need to run r = 1 to 1000 and line 40 has
              > to
              > > go from e = 1 to e = 10.
              > >
              > > Thank you,
              > >
              > > I hope you can help.
              > >
              > > -Hermann
              > >
              > > On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:
              > >
              > > >
              > > > Hi Hermann,
              > > >
              > > > I'm not 100% clear on what it is you are trying to do, but I'll
              > give
              > > > it a go.
              > > >
              > > > You open file to read like this: open "/your-path/goes/here/my-
              > > > file.txt" for input as #1
              > > > You can then read like this: input #1,a$
              > > >
              > > > You open for writing almost the same way: open "/your-path/goes/
              > > here/
              > > > my-file.txt" for output as #1
              > > > You can then write like this: print #1,a$
              > > >
              > > > ... If this isn't what you needed could you expand?
              > > >
              > > > Kind regards,
              > > >
              > > > Justin
              > > >
              > > > ---
              > > >
              > > > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
              > > >
              > > > > From: wellenst@...
              > > > > Subject:
              > > > > Date: August 28, 2008 2:04:10 PM EDT
              > > > > To: chipmunkbasicforum@yahoogroups.com
              > > > >
              > > > > Help!
              > > > >
              > > > > I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk Basic
              > and
              > > > > wrote a little program but cannot open or print into files. Do I
              > > > > need SimpleText. How can I get it?
              > > > >
              > > > > Thanks,
              > > > > Hermann
              > > > >
              > > > > [Non-text portions of this message have been removed]
              > > > >
              > > > >
              > > > >
              > > >
              > > > [Non-text portions of this message have been removed]
              > > >
              > > >
              > > >
              > >
              > > [Non-text portions of this message have been removed]
              > >
              > >
              > >
              >
              > [Non-text portions of this message have been removed]
              >
              >
              >



              [Non-text portions of this message have been removed]
            • Justin T Fanning
              Hi Hermann, I m not 100% sure what the code is meant to do, so I won t comment on the code itself (unless you re looking for feedback). The issue with the
              Message 6 of 11 , Sep 17, 2008
                Hi Hermann,

                I'm not 100% sure what the code is meant to do, so I won't comment on
                the code itself (unless you're looking for feedback).

                The issue with the output seems simply that you are not closing the
                output file.

                Just add:

                190 close #1

                and see how that goes, I just ran your code at this end (Mac OSX) and
                it works fine with that extra line.

                For what its worth, I usually add a hard path so you know exactly
                where your output is going, otherwise I believe Chipmunk
                defaults to the last directory you saved code into *not* your home
                directory (I had to go searching for the output file myself).


                Justin

                ---

                On 17 Sep 2008, at 13:06, Hermann Wellenstein wrote:

                > Hi Justin,
                >
                > Sorry I forgot to attach.
                >
                > 10 open "electrons.txt" for output as #1
                > 20 for r = 1 to 100
                > 40 e = 1
                > 60 for f = 1 to 512
                > 80 for n = 1 to e
                > 100 if rnd(1) < .01 then e=e+1
                > 120 next n
                > 140 next f
                > 160 print e
                > 167 print #1, e
                > 180 next r
                >
                > > > Here is what I tried to run:
                > > >
                > > > without lines 10 and 167 it runs but I do not get a file. To copy
                > > and
                > > > paste does not work as i need to run r = 1 to 1000 and line 40 has
                > > to
                > > > go from e = 1 to e = 10.
                >
                > in an additional for .... to ....
                >
                > > >
                > > > Thank you,
                > > >
                > > > I hope you can help.
                > > >
                > > > -Hermann
                >
                > Is there any way to write into an excel file or is that asking for too
                > much.. -h
                >
                > On Sep 17, 2008, at 5:48 AM, Justin T Fanning wrote:
                >
                > >
                > > Hi Hermann,
                > >
                > > Thanks for the Email.
                > >
                > > If your code is not huge do you want to post it up, without seeing
                > the
                > > code I can't really comment on "line 10", "line 167" etc.
                > >
                > > Thanks,
                > >
                > > Justin
                > >
                > > ---
                > >
                > > On 14 Sep 2008, at 17:47, Hermann Wellenstein wrote:
                > >
                > > >
                > > > Hi Justin,
                > > >
                > > > Here is what I tried to run:
                > > >
                > > > without lines 10 and 167 it runs but I do not get a file. To copy
                > > and
                > > > paste does not work as i need to run r = 1 to 1000 and line 40 has
                > > to
                > > > go from e = 1 to e = 10.
                > > >
                > > > Thank you,
                > > >
                > > > I hope you can help.
                > > >
                > > > -Hermann
                > > >
                > > > On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:
                > > >
                > > > >
                > > > > Hi Hermann,
                > > > >
                > > > > I'm not 100% clear on what it is you are trying to do, but I'll
                > > give
                > > > > it a go.
                > > > >
                > > > > You open file to read like this: open "/your-path/goes/here/my-
                > > > > file.txt" for input as #1
                > > > > You can then read like this: input #1,a$
                > > > >
                > > > > You open for writing almost the same way: open "/your-path/goes/
                > > > here/
                > > > > my-file.txt" for output as #1
                > > > > You can then write like this: print #1,a$
                > > > >
                > > > > ... If this isn't what you needed could you expand?
                > > > >
                > > > > Kind regards,
                > > > >
                > > > > Justin
                > > > >
                > > > > ---
                > > > >
                > > > > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
                > > > >
                > > > > > From: wellenst@...
                > > > > > Subject:
                > > > > > Date: August 28, 2008 2:04:10 PM EDT
                > > > > > To: chipmunkbasicforum@yahoogroups.com
                > > > > >
                > > > > > Help!
                > > > > >
                > > > > > I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk Basic
                > > and
                > > > > > wrote a little program but cannot open or print into files.
                > Do I
                > > > > > need SimpleText. How can I get it?
                > > > > >
                > > > > > Thanks,
                > > > > > Hermann
                > > > > >
                > > > > > [Non-text portions of this message have been removed]
                > > > > >
                > > > > >
                > > > > >
                > > > >
                > > > > [Non-text portions of this message have been removed]
                > > > >
                > > > >
                > > > >
                > > >
                > > > [Non-text portions of this message have been removed]
                > > >
                > > >
                > > >
                > >
                > > [Non-text portions of this message have been removed]
                > >
                > >
                > >
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >



                [Non-text portions of this message have been removed]
              • Hermann Wellenstein
                Hi Justin, I just tried to run and it still says file not found on line 10. What am I doing wrong? In case you like to know: In a electron multiplying CCD
                Message 7 of 11 , Sep 17, 2008
                  Hi Justin,

                  I just tried to run



                  and it still says file not found on line 10.

                  What am I doing wrong?

                  In case you like to know: In a electron multiplying CCD (EM-CCD) an
                  electron (assume there was only one in a pixel) is transfered through
                  512 read-out-wells each time with a .01 chance to multiply the charge
                  (one electron becomes two). How many electrons will be in the last
                  well. The program does 100 trails.

                  -Hermann


                  On Sep 17, 2008, at 11:34 AM, Justin T Fanning wrote:

                  >
                  > Hi Hermann,
                  > gram I'm not 100% sure what the code is meant to do, so I won't
                  > comment on
                  > the code itself (unless you're looking for feedback).
                  >
                  > The issue with the output seems simply that you are not closing the
                  > output file.
                  >
                  > Just add:
                  >
                  > 190 close #1
                  >
                  > and see how that goes, I just ran your code at this end (Mac OSX) and
                  > it works fine with that extra line.
                  >
                  > For what its worth, I usually add a hard path so you know exactly
                  > where your output is going, otherwise I believe Chipmunk
                  > defaults to the last directory you saved code into *not* your home
                  > directory (I had to go searching for the output file myself).
                  >
                  > Justin
                  >
                  > ---
                  >
                  > On 17 Sep 2008, at 13:06, Hermann Wellenstein wrote:
                  >
                  > > Hi Justin,
                  > >
                  > > Sorry I forgot to attach.
                  > >
                  > > 10 open "electrons.txt" for output as #1
                  > > 20 for r = 1 to 100
                  > > 40 e = 1
                  > > 60 for f = 1 to 512
                  > > 80 for n = 1 to e
                  > > 100 if rnd(1) < .01 then e=e+1
                  > > 120 next n
                  > > 140 next f
                  > > 160 print e
                  > > 167 print #1, e
                  > > 180 next r
                  > >
                  > > > > Here is what I tried to run:
                  > > > >
                  > > > > without lines 10 and 167 it runs but I do not get a file. To
                  > copy
                  > > > and
                  > > > > paste does not work as i need to run r = 1 to 1000 and line 40
                  > has
                  > > > to
                  > > > > go from e = 1 to e = 10.
                  > >
                  > > in an additional for .... to ....
                  > >
                  > > > >
                  > > > > Thank you,
                  > > > >
                  > > > > I hope you can help.
                  > > > >
                  > > > > -Hermann
                  > >
                  > > Is there any way to write into an excel file or is that asking for
                  > too
                  > > much.. -h
                  > >
                  > > On Sep 17, 2008, at 5:48 AM, Justin T Fanning wrote:
                  > >
                  > > >
                  > > > Hi Hermann,
                  > > >
                  > > > Thanks for the Email.
                  > > >
                  > > > If your code is not huge do you want to post it up, without seeing
                  > > the
                  > > > code I can't really comment on "line 10", "line 167" etc.
                  > > >
                  > > > Thanks,
                  > > >
                  > > > Justin
                  > > >
                  > > > ---
                  > > >
                  > > > On 14 Sep 2008, at 17:47, Hermann Wellenstein wrote:
                  > > >
                  > > > >
                  > > > > Hi Justin,
                  > > > >
                  > > > > Here is what I tried to run:
                  > > > >
                  > > > > without lines 10 and 167 it runs but I do not get a file. To
                  > copy
                  > > > and
                  > > > > paste does not work as i need to run r = 1 to 1000 and line 40
                  > has
                  > > > to
                  > > > > go from e = 1 to e = 10.
                  > > > >
                  > > > > Thank you,
                  > > > >
                  > > > > I hope you can help.
                  > > > >
                  > > > > -Hermann
                  > > > >
                  > > > > On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:
                  > > > >
                  > > > > >
                  > > > > > Hi Hermann,
                  > > > > >
                  > > > > > I'm not 100% clear on what it is you are trying to do, but
                  > I'll
                  > > > give
                  > > > > > it a go.
                  > > > > >
                  > > > > > You open file to read like this: open "/your-path/goes/here/
                  > my-
                  > > > > > file.txt" for input as #1
                  > > > > > You can then read like this: input #1,a$
                  > > > > >
                  > > > > > You open for writing almost the same way: open "/your-path/
                  > goes/
                  > > > > here/
                  > > > > > my-file.txt" for output as #1
                  > > > > > You can then write like this: print #1,a$
                  > > > > >
                  > > > > > ... If this isn't what you needed could you expand?
                  > > > > >
                  > > > > > Kind regards,
                  > > > > >
                  > > > > > Justin
                  > > > > >
                  > > > > > ---
                  > > > > >
                  > > > > > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
                  > > > > >
                  > > > > > > From: wellenst@...
                  > > > > > > Subject:
                  > > > > > > Date: August 28, 2008 2:04:10 PM EDT
                  > > > > > > To: chipmunkbasicforum@yahoogroups.com
                  > > > > > >
                  > > > > > > Help!
                  > > > > > >
                  > > > > > > I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk
                  > Basic
                  > > > and
                  > > > > > > wrote a little program but cannot open or print into files.
                  > > Do I
                  > > > > > > need SimpleText. How can I get it?
                  > > > > > >
                  > > > > > > Thanks,
                  > > > > > > Hermann
                  > > > > > >
                  > > > > > > [Non-text portions of this message have been removed]
                  > > > > > >
                  > > > > > >
                  > > > > > >
                  > > > > >
                  > > > > > [Non-text portions of this message have been removed]
                  > > > > >
                  > > > > >
                  > > > > >
                  > > > >
                  > > > > [Non-text portions of this message have been removed]
                  > > > >
                  > > > >
                  > > > >
                  > > >
                  > > > [Non-text portions of this message have been removed]
                  > > >
                  > > >
                  > > >
                  > >
                  > > [Non-text portions of this message have been removed]
                  > >
                  > >
                  > >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                  >
                  >



                  [Non-text portions of this message have been removed]
                • Justin T Fanning
                  Hi Hermann, I believe what s happening is you have run the code, but then stopped it before it got to the close line. You have then run the code again (I
                  Message 8 of 11 , Sep 18, 2008
                    Hi Hermann,

                    I believe what's happening is you have run the code, but then stopped
                    it before it got to the close line. You have then run the code again
                    (I don't see any goto's that would return the code to line 10).

                    Chipmunk has a small error in that if you try to assign an already
                    assigned file number, you get "file not found" (even if you're asking
                    chipmunk to create the file).

                    Look at this example:

                    >open "/Users/justin/dog.txt" for output as #1

                    ... So far so good, lets use file #1 again without closing the first

                    >open "/Users/justin/cat.txt" for output as #1
                    File not found

                    One solution (that is not particularly elegant), is you could always
                    modify the first line in your code as follows:

                    10 close #1 : open "electrons.txt" for output as #1

                    This way if #1 was in use (from a prior run for example) this will
                    close the old one out before opening the new one. Chipmunk doesn't
                    give an error if you close a file number not in use.


                    Justin

                    PS, if someone has an elegant way to test if a file number is in use
                    please post!

                    ---

                    On 17 Sep 2008, at 17:28, Hermann Wellenstein wrote:

                    > Hi Justin,
                    >
                    > I just tried to run
                    >
                    > and it still says file not found on line 10.
                    >
                    > What am I doing wrong?
                    >
                    > In case you like to know: In a electron multiplying CCD (EM-CCD) an
                    > electron (assume there was only one in a pixel) is transfered through
                    > 512 read-out-wells each time with a .01 chance to multiply the charge
                    > (one electron becomes two). How many electrons will be in the last
                    > well. The program does 100 trails.
                    >
                    > -Hermann
                    >
                    > On Sep 17, 2008, at 11:34 AM, Justin T Fanning wrote:
                    >
                    > >
                    > > Hi Hermann,
                    > > gram I'm not 100% sure what the code is meant to do, so I won't
                    > > comment on
                    > > the code itself (unless you're looking for feedback).
                    > >
                    > > The issue with the output seems simply that you are not closing the
                    > > output file.
                    > >
                    > > Just add:
                    > >
                    > > 190 close #1
                    > >
                    > > and see how that goes, I just ran your code at this end (Mac OSX)
                    > and
                    > > it works fine with that extra line.
                    > >
                    > > For what its worth, I usually add a hard path so you know exactly
                    > > where your output is going, otherwise I believe Chipmunk
                    > > defaults to the last directory you saved code into *not* your home
                    > > directory (I had to go searching for the output file myself).
                    > >
                    > > Justin
                    > >
                    > > ---
                    > >
                    > > On 17 Sep 2008, at 13:06, Hermann Wellenstein wrote:
                    > >
                    > > > Hi Justin,
                    > > >
                    > > > Sorry I forgot to attach.
                    > > >
                    > > > 10 open "electrons.txt" for output as #1
                    > > > 20 for r = 1 to 100
                    > > > 40 e = 1
                    > > > 60 for f = 1 to 512
                    > > > 80 for n = 1 to e
                    > > > 100 if rnd(1) < .01 then e=e+1
                    > > > 120 next n
                    > > > 140 next f
                    > > > 160 print e
                    > > > 167 print #1, e
                    > > > 180 next r
                    > > >
                    > > > > > Here is what I tried to run:
                    > > > > >
                    > > > > > without lines 10 and 167 it runs but I do not get a file. To
                    > > copy
                    > > > > and
                    > > > > > paste does not work as i need to run r = 1 to 1000 and line 40
                    > > has
                    > > > > to
                    > > > > > go from e = 1 to e = 10.
                    > > >
                    > > > in an additional for .... to ....
                    > > >
                    > > > > >
                    > > > > > Thank you,
                    > > > > >
                    > > > > > I hope you can help.
                    > > > > >
                    > > > > > -Hermann
                    > > >
                    > > > Is there any way to write into an excel file or is that asking for
                    > > too
                    > > > much.. -h
                    > > >
                    > > > On Sep 17, 2008, at 5:48 AM, Justin T Fanning wrote:
                    > > >
                    > > > >
                    > > > > Hi Hermann,
                    > > > >
                    > > > > Thanks for the Email.
                    > > > >
                    > > > > If your code is not huge do you want to post it up, without
                    > seeing
                    > > > the
                    > > > > code I can't really comment on "line 10", "line 167" etc.
                    > > > >
                    > > > > Thanks,
                    > > > >
                    > > > > Justin
                    > > > >
                    > > > > ---
                    > > > >
                    > > > > On 14 Sep 2008, at 17:47, Hermann Wellenstein wrote:
                    > > > >
                    > > > > >
                    > > > > > Hi Justin,
                    > > > > >
                    > > > > > Here is what I tried to run:
                    > > > > >
                    > > > > > without lines 10 and 167 it runs but I do not get a file. To
                    > > copy
                    > > > > and
                    > > > > > paste does not work as i need to run r = 1 to 1000 and line 40
                    > > has
                    > > > > to
                    > > > > > go from e = 1 to e = 10.
                    > > > > >
                    > > > > > Thank you,
                    > > > > >
                    > > > > > I hope you can help.
                    > > > > >
                    > > > > > -Hermann
                    > > > > >
                    > > > > > On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:
                    > > > > >
                    > > > > > >
                    > > > > > > Hi Hermann,
                    > > > > > >
                    > > > > > > I'm not 100% clear on what it is you are trying to do, but
                    > > I'll
                    > > > > give
                    > > > > > > it a go.
                    > > > > > >
                    > > > > > > You open file to read like this: open "/your-path/goes/here/
                    > > my-
                    > > > > > > file.txt" for input as #1
                    > > > > > > You can then read like this: input #1,a$
                    > > > > > >
                    > > > > > > You open for writing almost the same way: open "/your-path/
                    > > goes/
                    > > > > > here/
                    > > > > > > my-file.txt" for output as #1
                    > > > > > > You can then write like this: print #1,a$
                    > > > > > >
                    > > > > > > ... If this isn't what you needed could you expand?
                    > > > > > >
                    > > > > > > Kind regards,
                    > > > > > >
                    > > > > > > Justin
                    > > > > > >
                    > > > > > > ---
                    > > > > > >
                    > > > > > > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
                    > > > > > >
                    > > > > > > > From: wellenst@...
                    > > > > > > > Subject:
                    > > > > > > > Date: August 28, 2008 2:04:10 PM EDT
                    > > > > > > > To: chipmunkbasicforum@yahoogroups.com
                    > > > > > > >
                    > > > > > > > Help!
                    > > > > > > >
                    > > > > > > > I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk
                    > > Basic
                    > > > > and
                    > > > > > > > wrote a little program but cannot open or print into
                    > files.
                    > > > Do I
                    > > > > > > > need SimpleText. How can I get it?
                    > > > > > > >
                    > > > > > > > Thanks,
                    > > > > > > > Hermann
                    > > > > > > >
                    > > > > > > > [Non-text portions of this message have been removed]
                    > > > > > > >
                    > > > > > > >
                    > > > > > > >
                    > > > > > >
                    > > > > > > [Non-text portions of this message have been removed]
                    > > > > > >
                    > > > > > >
                    > > > > > >
                    > > > > >
                    > > > > > [Non-text portions of this message have been removed]
                    > > > > >
                    > > > > >
                    > > > > >
                    > > > >
                    > > > > [Non-text portions of this message have been removed]
                    > > > >
                    > > > >
                    > > > >
                    > > >
                    > > > [Non-text portions of this message have been removed]
                    > > >
                    > > >
                    > > >
                    > >
                    > > [Non-text portions of this message have been removed]
                    > >
                    > >
                    > >
                    >
                    > [Non-text portions of this message have been removed]
                    >
                    >
                    >



                    [Non-text portions of this message have been removed]
                  • Hermann Wellenstein
                    Hi Justin, Still not working. The one with line 15 run once and wrote a correct file, but then not again. I need to discuss the EM-CCD at a meeting at MIT on
                    Message 9 of 11 , Sep 19, 2008
                      Hi Justin,

                      Still not working. The one with line 15 run once and wrote a correct
                      file, but then not again.

                      I need to discuss the EM-CCD at a meeting at MIT on Tuesday would be
                      great if it worked before then

                      -Hermann




                      On Sep 18, 2008, at 2:26 PM, Justin T Fanning wrote:

                      >
                      > Hi Hermann,
                      >
                      > I believe what's happening is you have run the code, but then stopped
                      > it before it got to the close line. You have then run the code again
                      > (I don't see any goto's that would return the code to line 10).
                      >
                      > Chipmunk has a small error in that if you try to assign an already
                      > assigned file number, you get "file not found" (even if you're asking
                      > chipmunk to create the file).
                      >
                      > Look at this example:
                      >
                      > >open "/Users/justin/dog.txt" for output as #1
                      >
                      > ... So far so good, lets use file #1 again without closing the first
                      >
                      > >open "/Users/justin/cat.txt" for output as #1
                      > File not found
                      >
                      > One solution (that is not particularly elegant), is you could always
                      > modify the first line in your code as follows:
                      >
                      > 10 close #1 : open "electrons.txt" for output as #1
                      >
                      > This way if #1 was in use (from a prior run for example) this will
                      > close the old one out before opening the new one. Chipmunk doesn't
                      > give an error if you close a file number not in use.
                      >
                      > Justin
                      >
                      > PS, if someone has an elegant way to test if a file number is in use
                      > please post!
                      >
                      > ---
                      >
                      > On 17 Sep 2008, at 17:28, Hermann Wellenstein wrote:
                      >
                      > > Hi Justin,
                      > >
                      > > I just tried to run
                      > >
                      > > and it still says file not found on line 10.
                      > >
                      > > What am I doing wrong?
                      > >
                      > > In case you like to know: In a electron multiplying CCD (EM-CCD) an
                      > > electron (assume there was only one in a pixel) is transfered
                      > through
                      > > 512 read-out-wells each time with a .01 chance to multiply the
                      > charge
                      > > (one electron becomes two). How many electrons will be in the last
                      > > well. The program does 100 trails.
                      > >
                      > > -Hermann
                      > >
                      > > On Sep 17, 2008, at 11:34 AM, Justin T Fanning wrote:
                      > >
                      > > >
                      > > > Hi Hermann,
                      > > > gram I'm not 100% sure what the code is meant to do, so I won't
                      > > > comment on
                      > > > the code itself (unless you're looking for feedback).
                      > > >
                      > > > The issue with the output seems simply that you are not closing
                      > the
                      > > > output file.
                      > > >
                      > > > Just add:
                      > > >
                      > > > 190 close #1
                      > > >
                      > > > and see how that goes, I just ran your code at this end (Mac OSX)
                      > > and
                      > > > it works fine with that extra line.
                      > > >
                      > > > For what its worth, I usually add a hard path so you know exactly
                      > > > where your output is going, otherwise I believe Chipmunk
                      > > > defaults to the last directory you saved code into *not* your home
                      > > > directory (I had to go searching for the output file myself).
                      > > >
                      > > > Justin
                      > > >
                      > > > ---
                      > > >
                      > > > On 17 Sep 2008, at 13:06, Hermann Wellenstein wrote:
                      > > >
                      > > > > Hi Justin,
                      > > > >
                      > > > > Sorry I forgot to attach.
                      > > > >
                      > > > > 10 open "electrons.txt" for output as #1
                      > > > > 20 for r = 1 to 100
                      > > > > 40 e = 1
                      > > > > 60 for f = 1 to 512
                      > > > > 80 for n = 1 to e
                      > > > > 100 if rnd(1) < .01 then e=e+1
                      > > > > 120 next n
                      > > > > 140 next f
                      > > > > 160 print e
                      > > > > 167 print #1, e
                      > > > > 180 next r
                      > > > >
                      > > > > > > Here is what I tried to run:
                      > > > > > >
                      > > > > > > without lines 10 and 167 it runs but I do not get a file. To
                      > > > copy
                      > > > > > and
                      > > > > > > paste does not work as i need to run r = 1 to 1000 and
                      > line 40
                      > > > has
                      > > > > > to
                      > > > > > > go from e = 1 to e = 10.
                      > > > >
                      > > > > in an additional for .... to ....
                      > > > >
                      > > > > > >
                      > > > > > > Thank you,
                      > > > > > >
                      > > > > > > I hope you can help.
                      > > > > > >
                      > > > > > > -Hermann
                      > > > >
                      > > > > Is there any way to write into an excel file or is that asking
                      > for
                      > > > too
                      > > > > much.. -h
                      > > > >
                      > > > > On Sep 17, 2008, at 5:48 AM, Justin T Fanning wrote:
                      > > > >
                      > > > > >
                      > > > > > Hi Hermann,
                      > > > > >
                      > > > > > Thanks for the Email.
                      > > > > >
                      > > > > > If your code is not huge do you want to post it up, without
                      > > seeing
                      > > > > the
                      > > > > > code I can't really comment on "line 10", "line 167" etc.
                      > > > > >
                      > > > > > Thanks,
                      > > > > >
                      > > > > > Justin
                      > > > > >
                      > > > > > ---
                      > > > > >
                      > > > > > On 14 Sep 2008, at 17:47, Hermann Wellenstein wrote:
                      > > > > >
                      > > > > > >
                      > > > > > > Hi Justin,
                      > > > > > >
                      > > > > > > Here is what I tried to run:
                      > > > > > >
                      > > > > > > without lines 10 and 167 it runs but I do not get a file. To
                      > > > copy
                      > > > > > and
                      > > > > > > paste does not work as i need to run r = 1 to 1000 and
                      > line 40
                      > > > has
                      > > > > > to
                      > > > > > > go from e = 1 to e = 10.
                      > > > > > >
                      > > > > > > Thank you,
                      > > > > > >
                      > > > > > > I hope you can help.
                      > > > > > >
                      > > > > > > -Hermann
                      > > > > > >
                      > > > > > > On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:
                      > > > > > >
                      > > > > > > >
                      > > > > > > > Hi Hermann,
                      > > > > > > >
                      > > > > > > > I'm not 100% clear on what it is you are trying to do, but
                      > > > I'll
                      > > > > > give
                      > > > > > > > it a go.
                      > > > > > > >
                      > > > > > > > You open file to read like this: open "/your-path/goes/
                      > here/
                      > > > my-
                      > > > > > > > file.txt" for input as #1
                      > > > > > > > You can then read like this: input #1,a$
                      > > > > > > >
                      > > > > > > > You open for writing almost the same way: open "/your-
                      > path/
                      > > > goes/
                      > > > > > > here/
                      > > > > > > > my-file.txt" for output as #1
                      > > > > > > > You can then write like this: print #1,a$
                      > > > > > > >
                      > > > > > > > ... If this isn't what you needed could you expand?
                      > > > > > > >
                      > > > > > > > Kind regards,
                      > > > > > > >
                      > > > > > > > Justin
                      > > > > > > >
                      > > > > > > > ---
                      > > > > > > >
                      > > > > > > > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
                      > > > > > > >
                      > > > > > > > > From: wellenst@...
                      > > > > > > > > Subject:
                      > > > > > > > > Date: August 28, 2008 2:04:10 PM EDT
                      > > > > > > > > To: chipmunkbasicforum@yahoogroups.com
                      > > > > > > > >
                      > > > > > > > > Help!
                      > > > > > > > >
                      > > > > > > > > I have a G4 mac with OSX 10.0.11. I downloaded Chipmunk
                      > > > Basic
                      > > > > > and
                      > > > > > > > > wrote a little program but cannot open or print into
                      > > files.
                      > > > > Do I
                      > > > > > > > > need SimpleText. How can I get it?
                      > > > > > > > >
                      > > > > > > > > Thanks,
                      > > > > > > > > Hermann
                      > > > > > > > >
                      > > > > > > > > [Non-text portions of this message have been removed]
                      > > > > > > > >
                      > > > > > > > >
                      > > > > > > > >
                      > > > > > > >
                      > > > > > > > [Non-text portions of this message have been removed]
                      > > > > > > >
                      > > > > > > >
                      > > > > > > >
                      > > > > > >
                      > > > > > > [Non-text portions of this message have been removed]
                      > > > > > >
                      > > > > > >
                      > > > > > >
                      > > > > >
                      > > > > > [Non-text portions of this message have been removed]
                      > > > > >
                      > > > > >
                      > > > > >
                      > > > >
                      > > > > [Non-text portions of this message have been removed]
                      > > > >
                      > > > >
                      > > > >
                      > > >
                      > > > [Non-text portions of this message have been removed]
                      > > >
                      > > >
                      > > >
                      > >
                      > > [Non-text portions of this message have been removed]
                      > >
                      > >
                      > >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                      >
                      >



                      [Non-text portions of this message have been removed]
                    • Justin T Fanning
                      Hi Hermann, Sometimes the simplest solutions are the best ... The code only outputs 100 numbers, why don t you simply modify the code as below, which sends the
                      Message 10 of 11 , Sep 22, 2008
                        Hi Hermann,

                        Sometimes the simplest solutions are the best ...

                        The code only outputs 100 numbers, why don't you simply modify the
                        code as below, which sends the output to screen and simply cut/paste
                        the output into a notepad etc.

                        10 rem open "electrons.txt" for output as #1
                        20 for r = 1 to 100
                        40 e = 1
                        60 for f = 1 to 512
                        80 for n = 1 to e
                        100 if rnd(1) < 0.01 then e = e+1
                        120 next n
                        140 next f
                        160 print e
                        167 rem print #1,e
                        180 next r

                        if you wanted to get fancy you could simply re-direct the output at
                        the command level ... I.E. basic mycode.bas > output.txt (remember to
                        type quit to return to OSX).


                        Justin

                        PS, with your original solution, every time you run the code you're
                        going to write over the prior results. OSX doesn't version control
                        files like VAX/VMS and other OS's do, meaning you would have to rename
                        the old output before you run the code again (if you need to keep
                        it). Alternatively you could modify the open command to generate a
                        dynamic filename i.e. wrap the whole thing in a loop then do a file$ =
                        "electrons-"+str$(a)+".txt" : open a$ for output as #1... then you'll
                        get output files electrons-1.txt, electrons-2.txt etc

                        ---

                        On 19 Sep 2008, at 15:52, Hermann Wellenstein wrote:

                        > Hi Justin,
                        >
                        > Still not working. The one with line 15 run once and wrote a correct
                        > file, but then not again.
                        >
                        > I need to discuss the EM-CCD at a meeting at MIT on Tuesday would be
                        > great if it worked before then
                        >
                        > -Hermann
                        >
                        > On Sep 18, 2008, at 2:26 PM, Justin T Fanning wrote:
                        >
                        > >
                        > > Hi Hermann,
                        > >
                        > > I believe what's happening is you have run the code, but then
                        > stopped
                        > > it before it got to the close line. You have then run the code again
                        > > (I don't see any goto's that would return the code to line 10).
                        > >
                        > > Chipmunk has a small error in that if you try to assign an already
                        > > assigned file number, you get "file not found" (even if you're
                        > asking
                        > > chipmunk to create the file).
                        > >
                        > > Look at this example:
                        > >
                        > > >open "/Users/justin/dog.txt" for output as #1
                        > >
                        > > ... So far so good, lets use file #1 again without closing the first
                        > >
                        > > >open "/Users/justin/cat.txt" for output as #1
                        > > File not found
                        > >
                        > > One solution (that is not particularly elegant), is you could always
                        > > modify the first line in your code as follows:
                        > >
                        > > 10 close #1 : open "electrons.txt" for output as #1
                        > >
                        > > This way if #1 was in use (from a prior run for example) this will
                        > > close the old one out before opening the new one. Chipmunk doesn't
                        > > give an error if you close a file number not in use.
                        > >
                        > > Justin
                        > >
                        > > PS, if someone has an elegant way to test if a file number is in use
                        > > please post!
                        > >
                        > > ---
                        > >
                        > > On 17 Sep 2008, at 17:28, Hermann Wellenstein wrote:
                        > >
                        > > > Hi Justin,
                        > > >
                        > > > I just tried to run
                        > > >
                        > > > and it still says file not found on line 10.
                        > > >
                        > > > What am I doing wrong?
                        > > >
                        > > > In case you like to know: In a electron multiplying CCD (EM-CCD)
                        > an
                        > > > electron (assume there was only one in a pixel) is transfered
                        > > through
                        > > > 512 read-out-wells each time with a .01 chance to multiply the
                        > > charge
                        > > > (one electron becomes two). How many electrons will be in the last
                        > > > well. The program does 100 trails.
                        > > >
                        > > > -Hermann
                        > > >
                        > > > On Sep 17, 2008, at 11:34 AM, Justin T Fanning wrote:
                        > > >
                        > > > >
                        > > > > Hi Hermann,
                        > > > > gram I'm not 100% sure what the code is meant to do, so I won't
                        > > > > comment on
                        > > > > the code itself (unless you're looking for feedback).
                        > > > >
                        > > > > The issue with the output seems simply that you are not closing
                        > > the
                        > > > > output file.
                        > > > >
                        > > > > Just add:
                        > > > >
                        > > > > 190 close #1
                        > > > >
                        > > > > and see how that goes, I just ran your code at this end (Mac
                        > OSX)
                        > > > and
                        > > > > it works fine with that extra line.
                        > > > >
                        > > > > For what its worth, I usually add a hard path so you know
                        > exactly
                        > > > > where your output is going, otherwise I believe Chipmunk
                        > > > > defaults to the last directory you saved code into *not* your
                        > home
                        > > > > directory (I had to go searching for the output file myself).
                        > > > >
                        > > > > Justin
                        > > > >
                        > > > > ---
                        > > > >
                        > > > > On 17 Sep 2008, at 13:06, Hermann Wellenstein wrote:
                        > > > >
                        > > > > > Hi Justin,
                        > > > > >
                        > > > > > Sorry I forgot to attach.
                        > > > > >
                        > > > > > 10 open "electrons.txt" for output as #1
                        > > > > > 20 for r = 1 to 100
                        > > > > > 40 e = 1
                        > > > > > 60 for f = 1 to 512
                        > > > > > 80 for n = 1 to e
                        > > > > > 100 if rnd(1) < .01 then e=e+1
                        > > > > > 120 next n
                        > > > > > 140 next f
                        > > > > > 160 print e
                        > > > > > 167 print #1, e
                        > > > > > 180 next r
                        > > > > >
                        > > > > > > > Here is what I tried to run:
                        > > > > > > >
                        > > > > > > > without lines 10 and 167 it runs but I do not get a
                        > file. To
                        > > > > copy
                        > > > > > > and
                        > > > > > > > paste does not work as i need to run r = 1 to 1000 and
                        > > line 40
                        > > > > has
                        > > > > > > to
                        > > > > > > > go from e = 1 to e = 10.
                        > > > > >
                        > > > > > in an additional for .... to ....
                        > > > > >
                        > > > > > > >
                        > > > > > > > Thank you,
                        > > > > > > >
                        > > > > > > > I hope you can help.
                        > > > > > > >
                        > > > > > > > -Hermann
                        > > > > >
                        > > > > > Is there any way to write into an excel file or is that asking
                        > > for
                        > > > > too
                        > > > > > much.. -h
                        > > > > >
                        > > > > > On Sep 17, 2008, at 5:48 AM, Justin T Fanning wrote:
                        > > > > >
                        > > > > > >
                        > > > > > > Hi Hermann,
                        > > > > > >
                        > > > > > > Thanks for the Email.
                        > > > > > >
                        > > > > > > If your code is not huge do you want to post it up, without
                        > > > seeing
                        > > > > > the
                        > > > > > > code I can't really comment on "line 10", "line 167" etc.
                        > > > > > >
                        > > > > > > Thanks,
                        > > > > > >
                        > > > > > > Justin
                        > > > > > >
                        > > > > > > ---
                        > > > > > >
                        > > > > > > On 14 Sep 2008, at 17:47, Hermann Wellenstein wrote:
                        > > > > > >
                        > > > > > > >
                        > > > > > > > Hi Justin,
                        > > > > > > >
                        > > > > > > > Here is what I tried to run:
                        > > > > > > >
                        > > > > > > > without lines 10 and 167 it runs but I do not get a
                        > file. To
                        > > > > copy
                        > > > > > > and
                        > > > > > > > paste does not work as i need to run r = 1 to 1000 and
                        > > line 40
                        > > > > has
                        > > > > > > to
                        > > > > > > > go from e = 1 to e = 10.
                        > > > > > > >
                        > > > > > > > Thank you,
                        > > > > > > >
                        > > > > > > > I hope you can help.
                        > > > > > > >
                        > > > > > > > -Hermann
                        > > > > > > >
                        > > > > > > > On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:
                        > > > > > > >
                        > > > > > > > >
                        > > > > > > > > Hi Hermann,
                        > > > > > > > >
                        > > > > > > > > I'm not 100% clear on what it is you are trying to do,
                        > but
                        > > > > I'll
                        > > > > > > give
                        > > > > > > > > it a go.
                        > > > > > > > >
                        > > > > > > > > You open file to read like this: open "/your-path/goes/
                        > > here/
                        > > > > my-
                        > > > > > > > > file.txt" for input as #1
                        > > > > > > > > You can then read like this: input #1,a$
                        > > > > > > > >
                        > > > > > > > > You open for writing almost the same way: open "/your-
                        > > path/
                        > > > > goes/
                        > > > > > > > here/
                        > > > > > > > > my-file.txt" for output as #1
                        > > > > > > > > You can then write like this: print #1,a$
                        > > > > > > > >
                        > > > > > > > > ... If this isn't what you needed could you expand?
                        > > > > > > > >
                        > > > > > > > > Kind regards,
                        > > > > > > > >
                        > > > > > > > > Justin
                        > > > > > > > >
                        > > > > > > > > ---
                        > > > > > > > >
                        > > > > > > > > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
                        > > > > > > > >
                        > > > > > > > > > From: wellenst@...
                        > > > > > > > > > Subject:
                        > > > > > > > > > Date: August 28, 2008 2:04:10 PM EDT
                        > > > > > > > > > To: chipmunkbasicforum@yahoogroups.com
                        > > > > > > > > >
                        > > > > > > > > > Help!
                        > > > > > > > > >
                        > > > > > > > > > I have a G4 mac with OSX 10.0.11. I downloaded
                        > Chipmunk
                        > > > > Basic
                        > > > > > > and
                        > > > > > > > > > wrote a little program but cannot open or print into
                        > > > files.
                        > > > > > Do I
                        > > > > > > > > > need SimpleText. How can I get it?
                        > > > > > > > > >
                        > > > > > > > > > Thanks,
                        > > > > > > > > > Hermann
                        > > > > > > > > >
                        > > > > > > > > > [Non-text portions of this message have been removed]
                        > > > > > > > > >
                        > > > > > > > > >
                        > > > > > > > > >
                        > > > > > > > >
                        > > > > > > > > [Non-text portions of this message have been removed]
                        > > > > > > > >
                        > > > > > > > >
                        > > > > > > > >
                        > > > > > > >
                        > > > > > > > [Non-text portions of this message have been removed]
                        > > > > > > >
                        > > > > > > >
                        > > > > > > >
                        > > > > > >
                        > > > > > > [Non-text portions of this message have been removed]
                        > > > > > >
                        > > > > > >
                        > > > > > >
                        > > > > >
                        > > > > > [Non-text portions of this message have been removed]
                        > > > > >
                        > > > > >
                        > > > > >
                        > > > >
                        > > > > [Non-text portions of this message have been removed]
                        > > > >
                        > > > >
                        > > > >
                        > > >
                        > > > [Non-text portions of this message have been removed]
                        > > >
                        > > >
                        > > >
                        > >
                        > > [Non-text portions of this message have been removed]
                        > >
                        > >
                        > >
                        >
                        > [Non-text portions of this message have been removed]
                        >
                        >
                        >



                        [Non-text portions of this message have been removed]
                      • Hermann Wellenstein
                        Hi Justin, To cut/paste from screen is not an option as r will go to 2000 or higher and the screen only retains a few hundred lines. Also I cannot select
                        Message 11 of 11 , Sep 23, 2008
                          Hi Justin,

                          To cut/paste from screen is not an option as r will go to 2000 or
                          higher and the screen only retains a few hundred lines. Also I cannot
                          select those 300 lines.

                          > basic mycode.bas > output.txt

                          I do not know how to do this

                          > (remember to type quit to return to OSX).

                          again no idea

                          > PS, with your original solution, every time you run the code you're
                          > going to write over the prior results.


                          this would be OK as I can copy and past into excel each time.

                          Still hopeful,
                          -Hermann




                          On Sep 22, 2008, at 11:26 AM, Justin T Fanning wrote:

                          >
                          > Hi Hermann,
                          >
                          > Sometimes the simplest solutions are the best ...
                          >
                          > The code only outputs 100 numbers, why don't you simply modify the
                          > code as below, which sends the output to screen and simply cut/paste
                          > the output into a notepad etc.
                          >
                          > 10 rem open "electrons.txt" for output as #1
                          > 20 for r = 1 to 100
                          > 40 e = 1
                          > 60 for f = 1 to 512
                          > 80 for n = 1 to e
                          > 100 if rnd(1) < 0.01 then e = e+1
                          > 120 next n
                          > 140 next f
                          > 160 print e
                          > 167 rem print #1,e
                          > 180 next r
                          >
                          > if you wanted to get fancy you could simply re-direct the output at
                          > the command level ... I.E. basic mycode.bas > output.txt (remember to
                          > type quit to return to OSX).
                          >
                          > Justin
                          >
                          > PS, with your original solution, every time you run the code you're
                          > going to write over the prior results. OSX doesn't version control
                          > files like VAX/VMS and other OS's do, meaning you would have to rename
                          > the old output before you run the code again (if you need to keep
                          > it). Alternatively you could modify the open command to generate a
                          > dynamic filename i.e. wrap the whole thing in a loop then do a file$ =
                          > "electrons-"+str$(a)+".txt" : open a$ for output as #1... then you'll
                          > get output files electrons-1.txt, electrons-2.txt etc
                          >
                          > ---
                          >
                          > On 19 Sep 2008, at 15:52, Hermann Wellenstein wrote:
                          >
                          > > Hi Justin,
                          > >
                          > > Still not working. The one with line 15 run once and wrote a correct
                          > > file, but then not again.
                          > >
                          > > I need to discuss the EM-CCD at a meeting at MIT on Tuesday would be
                          > > great if it worked before then
                          > >
                          > > -Hermann
                          > >
                          > > On Sep 18, 2008, at 2:26 PM, Justin T Fanning wrote:
                          > >
                          > > >
                          > > > Hi Hermann,
                          > > >
                          > > > I believe what's happening is you have run the code, but then
                          > > stopped
                          > > > it before it got to the close line. You have then run the code
                          > again
                          > > > (I don't see any goto's that would return the code to line 10).
                          > > >
                          > > > Chipmunk has a small error in that if you try to assign an already
                          > > > assigned file number, you get "file not found" (even if you're
                          > > asking
                          > > > chipmunk to create the file).
                          > > >
                          > > > Look at this example:
                          > > >
                          > > > >open "/Users/justin/dog.txt" for output as #1
                          > > >
                          > > > ... So far so good, lets use file #1 again without closing the
                          > first
                          > > >
                          > > > >open "/Users/justin/cat.txt" for output as #1
                          > > > File not found
                          > > >
                          > > > One solution (that is not particularly elegant), is you could
                          > always
                          > > > modify the first line in your code as follows:
                          > > >
                          > > > 10 close #1 : open "electrons.txt" for output as #1
                          > > >
                          > > > This way if #1 was in use (from a prior run for example) this will
                          > > > close the old one out before opening the new one. Chipmunk doesn't
                          > > > give an error if you close a file number not in use.
                          > > >
                          > > > Justin
                          > > >
                          > > > PS, if someone has an elegant way to test if a file number is in
                          > use
                          > > > please post!
                          > > >
                          > > > ---
                          > > >
                          > > > On 17 Sep 2008, at 17:28, Hermann Wellenstein wrote:
                          > > >
                          > > > > Hi Justin,
                          > > > >
                          > > > > I just tried to run
                          > > > >
                          > > > > and it still says file not found on line 10.
                          > > > >
                          > > > > What am I doing wrong?
                          > > > >
                          > > > > In case you like to know: In a electron multiplying CCD (EM-CCD)
                          > > an
                          > > > > electron (assume there was only one in a pixel) is transfered
                          > > > through
                          > > > > 512 read-out-wells each time with a .01 chance to multiply the
                          > > > charge
                          > > > > (one electron becomes two). How many electrons will be in the
                          > last
                          > > > > well. The program does 100 trails.
                          > > > >
                          > > > > -Hermann
                          > > > >
                          > > > > On Sep 17, 2008, at 11:34 AM, Justin T Fanning wrote:
                          > > > >
                          > > > > >
                          > > > > > Hi Hermann,
                          > > > > > gram I'm not 100% sure what the code is meant to do, so I
                          > won't
                          > > > > > comment on
                          > > > > > the code itself (unless you're looking for feedback).
                          > > > > >
                          > > > > > The issue with the output seems simply that you are not
                          > closing
                          > > > the
                          > > > > > output file.
                          > > > > >
                          > > > > > Just add:
                          > > > > >
                          > > > > > 190 close #1
                          > > > > >
                          > > > > > and see how that goes, I just ran your code at this end (Mac
                          > > OSX)
                          > > > > and
                          > > > > > it works fine with that extra line.
                          > > > > >
                          > > > > > For what its worth, I usually add a hard path so you know
                          > > exactly
                          > > > > > where your output is going, otherwise I believe Chipmunk
                          > > > > > defaults to the last directory you saved code into *not* your
                          > > home
                          > > > > > directory (I had to go searching for the output file myself).
                          > > > > >
                          > > > > > Justin
                          > > > > >
                          > > > > > ---
                          > > > > >
                          > > > > > On 17 Sep 2008, at 13:06, Hermann Wellenstein wrote:
                          > > > > >
                          > > > > > > Hi Justin,
                          > > > > > >
                          > > > > > > Sorry I forgot to attach.
                          > > > > > >
                          > > > > > > 10 open "electrons.txt" for output as #1
                          > > > > > > 20 for r = 1 to 100
                          > > > > > > 40 e = 1
                          > > > > > > 60 for f = 1 to 512
                          > > > > > > 80 for n = 1 to e
                          > > > > > > 100 if rnd(1) < .01 then e=e+1
                          > > > > > > 120 next n
                          > > > > > > 140 next f
                          > > > > > > 160 print e
                          > > > > > > 167 print #1, e
                          > > > > > > 180 next r
                          > > > > > >
                          > > > > > > > > Here is what I tried to run:
                          > > > > > > > >
                          > > > > > > > > without lines 10 and 167 it runs but I do not get a
                          > > file. To
                          > > > > > copy
                          > > > > > > > and
                          > > > > > > > > paste does not work as i need to run r = 1 to 1000 and
                          > > > line 40
                          > > > > > has
                          > > > > > > > to
                          > > > > > > > > go from e = 1 to e = 10.
                          > > > > > >
                          > > > > > > in an additional for .... to ....
                          > > > > > >
                          > > > > > > > >
                          > > > > > > > > Thank you,
                          > > > > > > > >
                          > > > > > > > > I hope you can help.
                          > > > > > > > >
                          > > > > > > > > -Hermann
                          > > > > > >
                          > > > > > > Is there any way to write into an excel file or is that
                          > asking
                          > > > for
                          > > > > > too
                          > > > > > > much.. -h
                          > > > > > >
                          > > > > > > On Sep 17, 2008, at 5:48 AM, Justin T Fanning wrote:
                          > > > > > >
                          > > > > > > >
                          > > > > > > > Hi Hermann,
                          > > > > > > >
                          > > > > > > > Thanks for the Email.
                          > > > > > > >
                          > > > > > > > If your code is not huge do you want to post it up,
                          > without
                          > > > > seeing
                          > > > > > > the
                          > > > > > > > code I can't really comment on "line 10", "line 167" etc.
                          > > > > > > >
                          > > > > > > > Thanks,
                          > > > > > > >
                          > > > > > > > Justin
                          > > > > > > >
                          > > > > > > > ---
                          > > > > > > >
                          > > > > > > > On 14 Sep 2008, at 17:47, Hermann Wellenstein wrote:
                          > > > > > > >
                          > > > > > > > >
                          > > > > > > > > Hi Justin,
                          > > > > > > > >
                          > > > > > > > > Here is what I tried to run:
                          > > > > > > > >
                          > > > > > > > > without lines 10 and 167 it runs but I do not get a
                          > > file. To
                          > > > > > copy
                          > > > > > > > and
                          > > > > > > > > paste does not work as i need to run r = 1 to 1000 and
                          > > > line 40
                          > > > > > has
                          > > > > > > > to
                          > > > > > > > > go from e = 1 to e = 10.
                          > > > > > > > >
                          > > > > > > > > Thank you,
                          > > > > > > > >
                          > > > > > > > > I hope you can help.
                          > > > > > > > >
                          > > > > > > > > -Hermann
                          > > > > > > > >
                          > > > > > > > > On Sep 13, 2008, at 7:53 PM, Justin T Fanning wrote:
                          > > > > > > > >
                          > > > > > > > > >
                          > > > > > > > > > Hi Hermann,
                          > > > > > > > > >
                          > > > > > > > > > I'm not 100% clear on what it is you are trying to do,
                          > > but
                          > > > > > I'll
                          > > > > > > > give
                          > > > > > > > > > it a go.
                          > > > > > > > > >
                          > > > > > > > > > You open file to read like this: open "/your-path/
                          > goes/
                          > > > here/
                          > > > > > my-
                          > > > > > > > > > file.txt" for input as #1
                          > > > > > > > > > You can then read like this: input #1,a$
                          > > > > > > > > >
                          > > > > > > > > > You open for writing almost the same way: open "/your-
                          > > > path/
                          > > > > > goes/
                          > > > > > > > > here/
                          > > > > > > > > > my-file.txt" for output as #1
                          > > > > > > > > > You can then write like this: print #1,a$
                          > > > > > > > > >
                          > > > > > > > > > ... If this isn't what you needed could you expand?
                          > > > > > > > > >
                          > > > > > > > > > Kind regards,
                          > > > > > > > > >
                          > > > > > > > > > Justin
                          > > > > > > > > >
                          > > > > > > > > > ---
                          > > > > > > > > >
                          > > > > > > > > > On 28 Aug 2008, at 19:36, Hermann Wellenstein wrote:
                          > > > > > > > > >
                          > > > > > > > > > > From: wellenst@...
                          > > > > > > > > > > Subject:
                          > > > > > > > > > > Date: August 28, 2008 2:04:10 PM EDT
                          > > > > > > > > > > To: chipmunkbasicforum@yahoogroups.com
                          > > > > > > > > > >
                          > > > > > > > > > > Help!
                          > > > > > > > > > >
                          > > > > > > > > > > I have a G4 mac with OSX 10.0.11. I downloaded
                          > > Chipmunk
                          > > > > > Basic
                          > > > > > > > and
                          > > > > > > > > > > wrote a little program but cannot open or print into
                          > > > > files.
                          > > > > > > Do I
                          > > > > > > > > > > need SimpleText. How can I get it?
                          > > > > > > > > > >
                          > > > > > > > > > > Thanks,
                          > > > > > > > > > > Hermann
                          > > > > > > > > > >
                          > > > > > > > > > > [Non-text portions of this message have been
                          > removed]
                          > > > > > > > > > >
                          > > > > > > > > > >
                          > > > > > > > > > >
                          > > > > > > > > >
                          > > > > > > > > > [Non-text portions of this message have been removed]
                          > > > > > > > > >
                          > > > > > > > > >
                          > > > > > > > > >
                          > > > > > > > >
                          > > > > > > > > [Non-text portions of this message have been removed]
                          > > > > > > > >
                          > > > > > > > >
                          > > > > > > > >
                          > > > > > > >
                          > > > > > > > [Non-text portions of this message have been removed]
                          > > > > > > >
                          > > > > > > >
                          > > > > > > >
                          > > > > > >
                          > > > > > > [Non-text portions of this message have been removed]
                          > > > > > >
                          > > > > > >
                          > > > > > >
                          > > > > >
                          > > > > > [Non-text portions of this message have been removed]
                          > > > > >
                          > > > > >
                          > > > > >
                          > > > >
                          > > > > [Non-text portions of this message have been removed]
                          > > > >
                          > > > >
                          > > > >
                          > > >
                          > > > [Non-text portions of this message have been removed]
                          > > >
                          > > >
                          > > >
                          > >
                          > > [Non-text portions of this message have been removed]
                          > >
                          > >
                          > >
                          >
                          > [Non-text portions of this message have been removed]
                          >
                          >
                          >



                          [Non-text portions of this message have been removed]
                        Your message has been successfully submitted and would be delivered to recipients shortly.