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

Re: [pcgen] Re: [BUG] Missing spells on character sheet

Expand Messages
  • Scott Ellsworth
    ... See my most recent post - you would be happier having the loop control variable look different in declaration than in use. Otherwise, you parse code
    Message 1 of 30 , Nov 1, 2001
    • 0 Attachment
      At 05:24 AM 11/1/2001 +0000, Mark Hulsman wrote:
      >I used commas since periods usually aren't used for seperating stuff
      >like that and I put the % in there so that people would realise that
      >was the variable when they see the exact same thing below it.

      See my most recent post - you would be happier having the loop control
      variable look different in declaration than in use. Otherwise, you parse
      code becomes confusing. (I was a compiler engineer at one point, and I
      made exactly this mistake in design once, and spent three years regretting
      it later.)

      Scott
      Scott Ellsworth
      scott@...
    • Greg Bezoff
      Is there a problem with nested FOR loops in Java? Or do you just not like to code them? If there is a problem with Java handling them, you can always emulate
      Message 2 of 30 , Nov 1, 2001
      • 0 Attachment
        Is there a problem with nested FOR loops in Java? Or do you just not
        like to code them? If there is a problem with Java handling them, you can
        always emulate them. I have emulated nested FOR loops in assembly language
        many times. You just need a vector of loop controls (instead of a single
        set of loop controls) and a piece of logic for each set of loop controls
        in the vector. No big deal, really, though it may not be the prettiest
        code around. In effect, you have one FOR loop for the outer set of loop
        controls and one or more IF/THEN/ELSE blocks for each of the inner sets of
        loop controls. And, of course, the last piece of the FOR statement has to
        be nilpotent (ie i = i + 0), so that the outer control variable is adjusted
        by the first inner IF/THEN/ELSE block when the first inner control variable
        falls off the end of its range. But I'm sure you know all this.

        --------------------
        Greg

        "Life is like a sewer. What you get out of it depends on what you put into
        it."
      • Mark Hulsman
        There is no problem with nested anything in java, there was just the problem with the way we coded them. The way they were coded in PC Gen they could only
        Message 3 of 30 , Nov 1, 2001
        • 0 Attachment
          There is no problem with nested anything in java, there was just the
          problem with the way we coded them. The way they were coded in PC
          Gen they could only have 1 line of stuff inside them so there was no
          way to put another loop inside them. But now you can. And speaking
          of IF/THEN/ELSE blocks, do you think it would be a good idea for me
          to recode them a little so that they can contain multiple lines of
          stuff like FOR loops now can? The way I set up FORs it would be
          simple to code that. And then IFs could also have FORs inside them.

          > Is there a problem with nested FOR loops in Java? Or do you
          just not
          > like to code them? If there is a problem with Java handling them,
          you can
          > always emulate them. I have emulated nested FOR loops in assembly
          language
          > many times. You just need a vector of loop controls (instead of a
          single
          > set of loop controls) and a piece of logic for each set of loop
          controls
          > in the vector. No big deal, really, though it may not be the
          prettiest
          > code around. In effect, you have one FOR loop for the outer set of
          loop
          > controls and one or more IF/THEN/ELSE blocks for each of the inner
          sets of
          > loop controls. And, of course, the last piece of the FOR statement
          has to
          > be nilpotent (ie i = i + 0), so that the outer control variable is
          adjusted
          > by the first inner IF/THEN/ELSE block when the first inner control
          variable
          > falls off the end of its range. But I'm sure you know all this.
        Your message has been successfully submitted and would be delivered to recipients shortly.