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

[BUG] Missing spells on character sheet

Expand Messages
  • Benjamin Pew
    I have a cleric 2/bard 12/harper scout 5 character. When I print a character sheet, the cleric, domain and bard spells all show up, but there is no sign of the
    Message 1 of 30 , Oct 31, 2001
      I have a cleric 2/bard 12/harper scout 5 character. When I print a character
      sheet, the cleric, domain and bard spells all show up, but there is no sign
      of the harper scout spells. For testing I made a cleric 1/druid 1/wizard
      1/psychic warrior 1. Spell information only appears for the cleric, domain,
      and druid spells. It looks like there's a hard-coded limit of three
      spell-casting classes that are output to the character sheets. This should
      be removed.

      Entered at sourceforge as 476778
    • Richard O'Doherty-Gregg
      The problem is, without nest |FOR| loops its a lot of work to support more spell casting classes. Basically the spellbook section has to be repeated N times.
      Message 2 of 30 , Oct 31, 2001
        The problem is, without nest |FOR| loops its a lot of work to support
        more spell casting classes.

        Basically the spellbook section has to be repeated N times. For my
        sheets N is currently 3 (I think, I may have supported 4 in my latest
        combined sheet in one section). How many should I support? Or should
        I just hold out for the day that PCGen supports nested |FOR| loops?

        It annoys me too. Also, my sheets currently only support 100 spells
        of any given level (which should be enough, but maybe not for some
        people).

        -ROG

        --- In pcgen@y..., Benjamin Pew <benpew@a...> wrote:
        > I have a cleric 2/bard 12/harper scout 5 character. When I print a
        character
        > sheet, the cleric, domain and bard spells all show up, but there is
        no sign
        > of the harper scout spells. For testing I made a cleric 1/druid
        1/wizard
        > 1/psychic warrior 1. Spell information only appears for the cleric,
        domain,
        > and druid spells. It looks like there's a hard-coded limit of three
        > spell-casting classes that are output to the character sheets. This
        should
        > be removed.
        >
        > Entered at sourceforge as 476778
      • Benjamin Pew
        With domains, 4 would certainly be better. 5 maybe, maybe not. I would probably think it would be better to increase it to 4 or 5 for now. ... From: Richard
        Message 3 of 30 , Oct 31, 2001
          With domains, 4 would certainly be better. 5 maybe, maybe not. I would
          probably think it would be better to increase it to 4 or 5 for now.


          -----Original Message-----
          From: Richard O'Doherty-Gregg [mailto:OdGregg@...]
          Sent: Wednesday, October 31, 2001 4:20 PM
          To: pcgen@yahoogroups.com
          Subject: [pcgen] Re: [BUG] Missing spells on character sheet


          The problem is, without nest |FOR| loops its a lot of work to support
          more spell casting classes.

          Basically the spellbook section has to be repeated N times. For my
          sheets N is currently 3 (I think, I may have supported 4 in my latest
          combined sheet in one section). How many should I support? Or should
          I just hold out for the day that PCGen supports nested |FOR| loops?

          It annoys me too. Also, my sheets currently only support 100 spells
          of any given level (which should be enough, but maybe not for some
          people).

          -ROG

          --- In pcgen@y..., Benjamin Pew <benpew@a...> wrote:
          > I have a cleric 2/bard 12/harper scout 5 character. When I print a
          character
          > sheet, the cleric, domain and bard spells all show up, but there is
          no sign
          > of the harper scout spells. For testing I made a cleric 1/druid
          1/wizard
          > 1/psychic warrior 1. Spell information only appears for the cleric,
          domain,
          > and druid spells. It looks like there's a hard-coded limit of three
          > spell-casting classes that are output to the character sheets. This
          should
          > be removed.
          >
          > Entered at sourceforge as 476778



          To unsubscribe from this group, send an email to:
          pcgen-unsubscribe@egroups.com



          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        • Richard O'Doherty-Gregg
          ... would ... Okay, I ll try and find some time to do it this weekend. A LOT of cut and paste/replace and manual editing :-) -ROG
          Message 4 of 30 , Oct 31, 2001
            --- In pcgen@y..., Benjamin Pew <benpew@a...> wrote:
            > With domains, 4 would certainly be better. 5 maybe, maybe not. I
            would
            > probably think it would be better to increase it to 4 or 5 for now.
            >

            Okay, I'll try and find some time to do it this weekend. A LOT of cut
            and paste/replace and manual editing :-)

            -ROG
          • Benjamin Pew
            I understand. If you don t get to it, that s OK with me. ... From: Richard O Doherty-Gregg [mailto:OdGregg@bigpond.com] Sent: Wednesday, October 31, 2001 4:29
            Message 5 of 30 , Oct 31, 2001
              I understand. If you don't get to it, that's OK with me.

              -----Original Message-----
              From: Richard O'Doherty-Gregg [mailto:OdGregg@...]
              Sent: Wednesday, October 31, 2001 4:29 PM
              To: pcgen@yahoogroups.com
              Subject: [pcgen] Re: [BUG] Missing spells on character sheet


              --- In pcgen@y..., Benjamin Pew <benpew@a...> wrote:
              > With domains, 4 would certainly be better. 5 maybe, maybe not. I
              would
              > probably think it would be better to increase it to 4 or 5 for now.
              >

              Okay, I'll try and find some time to do it this weekend. A LOT of cut
              and paste/replace and manual editing :-)

              -ROG



              To unsubscribe from this group, send an email to:
              pcgen-unsubscribe@egroups.com



              Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            • merton_monk@yahoo.com
              I seem to recall someone saying they were going to work on that for me - nesting for loops, that is - but I don t believe it s been addressed. Do you think
              Message 6 of 30 , Oct 31, 2001
                I seem to recall someone saying they were going to work on that for
                me - nesting for loops, that is - but I don't believe it's been
                addressed. Do you think just allowing 2 levels of for loops would be
                enough? I could easily add support for 2 levels, handling n-levels
                is the part that has me scratching my head. Obviously would need to
                be done via recusrion, and I could probably figure it out if I forced
                myself... but if just 2 levels of for loops is all that would ever be
                needed, it would really simplify the requirements. :)

                -Bryan

                --- In pcgen@y..., "Richard O'Doherty-Gregg" <OdGregg@b...> wrote:
                > The problem is, without nest |FOR| loops its a lot of work to
                support
                > more spell casting classes.
                >
                > Basically the spellbook section has to be repeated N times. For my
                > sheets N is currently 3 (I think, I may have supported 4 in my
                latest
                > combined sheet in one section). How many should I support? Or
                should
                > I just hold out for the day that PCGen supports nested |FOR| loops?
                >
                > It annoys me too. Also, my sheets currently only support 100 spells
                > of any given level (which should be enough, but maybe not for some
                > people).
                >
                > -ROG
                >
                > --- In pcgen@y..., Benjamin Pew <benpew@a...> wrote:
                > > I have a cleric 2/bard 12/harper scout 5 character. When I print
                a
                > character
                > > sheet, the cleric, domain and bard spells all show up, but there
                is
                > no sign
                > > of the harper scout spells. For testing I made a cleric 1/druid
                > 1/wizard
                > > 1/psychic warrior 1. Spell information only appears for the
                cleric,
                > domain,
                > > and druid spells. It looks like there's a hard-coded limit of
                three
                > > spell-casting classes that are output to the character sheets.
                This
                > should
                > > be removed.
                > >
                > > Entered at sourceforge as 476778
              • merton_monk@yahoo.com
                Soon there will be no domain class - like release 2.2.3. I ve never liked it and I m getting rid of it. It s served its purpose as a fill-in, but that s all
                Message 7 of 30 , Oct 31, 2001
                  Soon there will be no domain class - like release 2.2.3. I've never
                  liked it and I'm getting rid of it. It's served its purpose as a
                  fill-in, but that's all it was meant to be. That said, allowing 2
                  concurrent for-loops should do the trick no matter how many
                  spellcasting classes you have *and* cut down on the size of ROG's
                  character sheets. :)

                  -Bryan

                  --- In pcgen@y..., Benjamin Pew <benpew@a...> wrote:
                  > With domains, 4 would certainly be better. 5 maybe, maybe not. I
                  would
                  > probably think it would be better to increase it to 4 or 5 for now.
                  >
                  >
                  > -----Original Message-----
                  > From: Richard O'Doherty-Gregg [mailto:OdGregg@b...]
                  > Sent: Wednesday, October 31, 2001 4:20 PM
                  > To: pcgen@y...
                  > Subject: [pcgen] Re: [BUG] Missing spells on character sheet
                  >
                  >
                  > The problem is, without nest |FOR| loops its a lot of work to
                  support
                  > more spell casting classes.
                  >
                  > Basically the spellbook section has to be repeated N times. For my
                  > sheets N is currently 3 (I think, I may have supported 4 in my
                  latest
                  > combined sheet in one section). How many should I support? Or
                  should
                  > I just hold out for the day that PCGen supports nested |FOR| loops?
                  >
                  > It annoys me too. Also, my sheets currently only support 100 spells
                  > of any given level (which should be enough, but maybe not for some
                  > people).
                  >
                  > -ROG
                  >
                  > --- In pcgen@y..., Benjamin Pew <benpew@a...> wrote:
                  > > I have a cleric 2/bard 12/harper scout 5 character. When I print
                  a
                  > character
                  > > sheet, the cleric, domain and bard spells all show up, but there
                  is
                  > no sign
                  > > of the harper scout spells. For testing I made a cleric 1/druid
                  > 1/wizard
                  > > 1/psychic warrior 1. Spell information only appears for the
                  cleric,
                  > domain,
                  > > and druid spells. It looks like there's a hard-coded limit of
                  three
                  > > spell-casting classes that are output to the character sheets.
                  This
                  > should
                  > > be removed.
                  > >
                  > > Entered at sourceforge as 476778
                  >
                  >
                  >
                  > To unsubscribe from this group, send an email to:
                  > pcgen-unsubscribe@egroups.com
                  >
                  >
                  >
                  > Your use of Yahoo! Groups is subject to
                  http://docs.yahoo.com/info/terms/
                • merton_monk@yahoo.com
                  Don t bother - I ll try to get the 2 levels of for loops done this weekend so you can do it much more simply. I ll let you know the syntax as soon as I figure
                  Message 8 of 30 , Oct 31, 2001
                    Don't bother - I'll try to get the 2 levels of for loops done this
                    weekend so you can do it much more simply. I'll let you know the
                    syntax as soon as I figure it out... :)

                    -Bryan

                    --- In pcgen@y..., "Richard O'Doherty-Gregg" <OdGregg@b...> wrote:
                    > --- In pcgen@y..., Benjamin Pew <benpew@a...> wrote:
                    > > With domains, 4 would certainly be better. 5 maybe, maybe not. I
                    > would
                    > > probably think it would be better to increase it to 4 or 5 for
                    now.
                    > >
                    >
                    > Okay, I'll try and find some time to do it this weekend. A LOT of
                    cut
                    > and paste/replace and manual editing :-)
                    >
                    > -ROG
                  • Richard O'Doherty-Gregg
                    2 levels should be fine for just about anything I can think of. We just need a new % for the other loop counter. # or $ or @ maybe? Or %1 and %2 (as
                    Message 9 of 30 , Oct 31, 2001
                      2 levels should be fine for just about anything I can think of.

                      We just need a new '%' for the other loop counter.

                      '#' or '$' or '@' maybe?

                      Or %1 and %2 (as long as % still works :-) )

                      -ROG

                      --- In pcgen@y..., merton_monk@y... wrote:
                      > Don't bother - I'll try to get the 2 levels of for loops done this
                      > weekend so you can do it much more simply. I'll let you know the
                      > syntax as soon as I figure it out... :)
                      >
                      > -Bryan
                    • Mark Hulsman
                      I vve actually been thinking about a way to do this and I think I ll loook at it tonight. Hopefully the syntax won t have to be changed at all. It would
                      Message 10 of 30 , Oct 31, 2001
                        I'vve actually been thinking about a way to do this and I think I'll
                        loook at it tonight. Hopefully the syntax won't have to be changed
                        at all. It would simply use recursion and each loop would go until
                        it reached an end of loop statement. The most recent loop would stop
                        and then the next most recent loop would continue until it reached
                        the next end of loop.

                        > 2 levels should be fine for just about anything I can think of.
                        >
                        > We just need a new '%' for the other loop counter.
                        >
                        > '#' or '$' or '@' maybe?
                        >
                        > Or %1 and %2 (as long as % still works :-) )
                        >
                        > -ROG
                        >
                        > --- In pcgen@y..., merton_monk@y... wrote:
                        > > Don't bother - I'll try to get the 2 levels of for loops done
                        this
                        > > weekend so you can do it much more simply. I'll let you know the
                        > > syntax as soon as I figure it out... :)
                        > >
                        > > -Bryan
                      • Richard O'Doherty-Gregg
                        But how would I choose which index is which? ie. SPELLCLASSCASTx.y Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need to be able to specify
                        Message 11 of 30 , Oct 31, 2001
                          But how would I choose which index is which?

                          ie.
                          SPELLCLASSCASTx.y

                          Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need to be
                          able to specify |SPELLCLASSCAST%.%| perhaps by |SPELLCLASSCAST%1.%2|?

                          -ROG
                          --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                          > I'vve actually been thinking about a way to do this and I think
                          I'll
                          > loook at it tonight. Hopefully the syntax won't have to be changed
                          > at all. It would simply use recursion and each loop would go until
                          > it reached an end of loop statement. The most recent loop would
                          stop
                          > and then the next most recent loop would continue until it reached
                          > the next end of loop.
                        • Mark Hulsman
                          Ok, I ve looked at changing loops to allow nested ones and I think I can do it. But it would involve a fairly extensive rewrite of how loops work and their
                          Message 12 of 30 , Oct 31, 2001
                            Ok, I've looked at changing loops to allow nested ones and I think I
                            can do it. But it would involve a fairly extensive rewrite of how
                            loops work and their syntax. But in the end it would allow loops to
                            be much more flexible. here's what I'm thinking. Change
                            |FOR.min,max,perLine,phrase, startLine,endLine,exists|
                            to
                            |FOR.min,max|
                            Anything you want here.
                            |ENDLOOP|

                            Basically what I would do is call a function that loops through all
                            the enclosed text and anywhere it finds a % it would replace it with
                            the current loop number. And if it came upon another FOR statement
                            it would call itself and anywhere it encoutered the % in that loop it
                            would use that loops value. and each loop would end when it gets to
                            the endloop. This would allow for a ton more flexibility since you
                            could have loops that had more than just one line of stuff in them.
                            And of course min and max could be any number or any of the COUNT[]
                            statements.

                            So please send me your comments on this idea. I will be taking a
                            break for a while and will probably start coding after that. And
                            most likely if I do this I will set up some logicc where if it finds
                            the old FOR code it would use that instead of this so that old sheets
                            would still work.


                            > I'vve actually been thinking about a way to do this and I think
                            I'll
                            > loook at it tonight. Hopefully the syntax won't have to be changed
                            > at all. It would simply use recursion and each loop would go until
                            > it reached an end of loop statement. The most recent loop would
                            stop
                            > and then the next most recent loop would continue until it reached
                            > the next end of loop.
                            >
                            > > 2 levels should be fine for just about anything I can think of.
                            > >
                            > > We just need a new '%' for the other loop counter.
                            > >
                            > > '#' or '$' or '@' maybe?
                            > >
                            > > Or %1 and %2 (as long as % still works :-) )
                            > >
                            > > -ROG
                            > >
                            > > --- In pcgen@y..., merton_monk@y... wrote:
                            > > > Don't bother - I'll try to get the 2 levels of for loops done
                            > this
                            > > > weekend so you can do it much more simply. I'll let you know
                            the
                            > > > syntax as soon as I figure it out... :)
                            > > >
                            > > > -Bryan
                          • Mark Hulsman
                            ... and then anywhere in the body of the loop that you put %text it would access that loop number? ... and anything else you would want to add in the middle
                            Message 13 of 30 , Oct 31, 2001
                              hmmm Didn't think about this. How about making the format:
                              |FOR.min,max,%text|
                              and then anywhere in the body of the loop that you put %text it would
                              access that loop number?

                              So you example would be like this:
                              |FOR.min,max,%class|
                              |FOR.min,max,%level|
                              |SPELLCLASSCAST%class.%level|
                              |ENDFOR|
                              |ENDFOR|
                              and anything else you would want to add in the middle with the mins
                              and maxes set to whatever you want. And the max value for the second
                              loop could contain %class in it so that you could loop through
                              different amounts each time. How's that sound?


                              That sounds pretty good to me. basically you would name the variable
                              for each loop you use and can access any of them anytime. Still
                              should be easy for me to do. I think I'm actually getting use from
                              my compilers class right now. Thats just wrong :) A class like
                              compilers should never be useful.


                              > But how would I choose which index is which?
                              >
                              > ie.
                              > SPELLCLASSCASTx.y
                              >
                              > Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need to be
                              > able to specify |SPELLCLASSCAST%.%| perhaps by |SPELLCLASSCAST%1.%
                              2|?
                              >
                              > -ROG
                              > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                              > > I'vve actually been thinking about a way to do this and I think
                              > I'll
                              > > loook at it tonight. Hopefully the syntax won't have to be
                              changed
                              > > at all. It would simply use recursion and each loop would go
                              until
                              > > it reached an end of loop statement. The most recent loop would
                              > stop
                              > > and then the next most recent loop would continue until it
                              reached
                              > > the next end of loop.
                            • Richard O'Doherty-Gregg
                              ... This would be excellent as it would allow line breaks in the middle of loops making them much easier to edit. You still need a away to specify which loop
                              Message 14 of 30 , Oct 31, 2001
                                --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                > |FOR.min,max|
                                > Anything you want here.
                                > |ENDLOOP|

                                This would be excellent as it would allow line breaks in the middle
                                of loops making them much easier to edit.

                                You still need a away to specify which loop counter to use though
                                (see my previous post).

                                I'd almost suggest that you add:

                                |FOR.min,max,symbol|

                                where symbol is a string that identifies that loop

                                eg.

                                |FOR.0,100,1|

                                Would have the loop counter %1

                                |FOR.0,100,x|

                                would have the loop counter %x

                                |FOR.0,100,class|

                                would have the loop counter %class and

                                |FOR.0,100,level|

                                would have the loop counter %level

                                This seems as though it would make the loops easier to understand as
                                well.

                                -ROG
                              • mynex2k1@yahoo.com
                                Would this work for something like this? ... SKILLS SA etc?? Mynex ... would ... second ... variable ... from ... be ... would
                                Message 15 of 30 , Oct 31, 2001
                                  Would this work for something like this?

                                  |FOR.min,max,%EQUIPMENT|

                                  SKILLS
                                  SA
                                  etc??

                                  Mynex

                                  --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                  > hmmm Didn't think about this. How about making the format:
                                  > |FOR.min,max,%text|
                                  > and then anywhere in the body of the loop that you put %text it
                                  would
                                  > access that loop number?
                                  >
                                  > So you example would be like this:
                                  > |FOR.min,max,%class|
                                  > |FOR.min,max,%level|
                                  > |SPELLCLASSCAST%class.%level|
                                  > |ENDFOR|
                                  > |ENDFOR|
                                  > and anything else you would want to add in the middle with the mins
                                  > and maxes set to whatever you want. And the max value for the
                                  second
                                  > loop could contain %class in it so that you could loop through
                                  > different amounts each time. How's that sound?
                                  >
                                  >
                                  > That sounds pretty good to me. basically you would name the
                                  variable
                                  > for each loop you use and can access any of them anytime. Still
                                  > should be easy for me to do. I think I'm actually getting use
                                  from
                                  > my compilers class right now. Thats just wrong :) A class like
                                  > compilers should never be useful.
                                  >
                                  >
                                  > > But how would I choose which index is which?
                                  > >
                                  > > ie.
                                  > > SPELLCLASSCASTx.y
                                  > >
                                  > > Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need to
                                  be
                                  > > able to specify |SPELLCLASSCAST%.%| perhaps by |SPELLCLASSCAST%1.%
                                  > 2|?
                                  > >
                                  > > -ROG
                                  > > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                  > > > I'vve actually been thinking about a way to do this and I think
                                  > > I'll
                                  > > > loook at it tonight. Hopefully the syntax won't have to be
                                  > changed
                                  > > > at all. It would simply use recursion and each loop would go
                                  > until
                                  > > > it reached an end of loop statement. The most recent loop
                                  would
                                  > > stop
                                  > > > and then the next most recent loop would continue until it
                                  > reached
                                  > > > the next end of loop.
                                • Mark Hulsman
                                  It would work for absolutely anything. The %text at the end is simply a varible identifier. you could put %ahsgsd, and anywhere %ahsgsd appears in the loop
                                  Message 16 of 30 , Oct 31, 2001
                                    It would work for absolutely anything. The %text at the end is
                                    simply a varible identifier. you could put %ahsgsd, and anywhere
                                    %ahsgsd appears in the loop it would replace it with the current
                                    number the loop is on. And it seems this is a very good way to
                                    implement this since both ROG and I had the same thought at the same
                                    time. So I'll look into coding this sometime tonight. I won't
                                    commit the changes until after I send them to the developers so that
                                    everyone can test them before committing such a radical change into
                                    the code. And I will try my best to implement backwards
                                    compatibility.

                                    > Would this work for something like this?
                                    >
                                    > |FOR.min,max,%EQUIPMENT|
                                    >
                                    > SKILLS
                                    > SA
                                    > etc??
                                    >
                                    > Mynex
                                    >
                                    > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                    > > hmmm Didn't think about this. How about making the format:
                                    > > |FOR.min,max,%text|
                                    > > and then anywhere in the body of the loop that you put %text it
                                    > would
                                    > > access that loop number?
                                    > >
                                    > > So you example would be like this:
                                    > > |FOR.min,max,%class|
                                    > > |FOR.min,max,%level|
                                    > > |SPELLCLASSCAST%class.%level|
                                    > > |ENDFOR|
                                    > > |ENDFOR|
                                    > > and anything else you would want to add in the middle with the
                                    mins
                                    > > and maxes set to whatever you want. And the max value for the
                                    > second
                                    > > loop could contain %class in it so that you could loop through
                                    > > different amounts each time. How's that sound?
                                    > >
                                    > >
                                    > > That sounds pretty good to me. basically you would name the
                                    > variable
                                    > > for each loop you use and can access any of them anytime. Still
                                    > > should be easy for me to do. I think I'm actually getting use
                                    > from
                                    > > my compilers class right now. Thats just wrong :) A class like
                                    > > compilers should never be useful.
                                    > >
                                    > >
                                    > > > But how would I choose which index is which?
                                    > > >
                                    > > > ie.
                                    > > > SPELLCLASSCASTx.y
                                    > > >
                                    > > > Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need
                                    to
                                    > be
                                    > > > able to specify |SPELLCLASSCAST%.%| perhaps by |SPELLCLASSCAST%
                                    1.%
                                    > > 2|?
                                    > > >
                                    > > > -ROG
                                    > > > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                    > > > > I'vve actually been thinking about a way to do this and I
                                    think
                                    > > > I'll
                                    > > > > loook at it tonight. Hopefully the syntax won't have to be
                                    > > changed
                                    > > > > at all. It would simply use recursion and each loop would go
                                    > > until
                                    > > > > it reached an end of loop statement. The most recent loop
                                    > would
                                    > > > stop
                                    > > > > and then the next most recent loop would continue until it
                                    > > reached
                                    > > > > the next end of loop.
                                  • RJBellamy
                                    I m trying to find some form of override for gaining bonus Psion powers gained through Psychic Chirogury (sp?) It is possible to have more powers than you
                                    Message 17 of 30 , Oct 31, 2001
                                      I'm trying to find some form of override for gaining bonus Psion powers
                                      gained through Psychic Chirogury (sp?)

                                      It is possible to have more powers than you might normally gain using this
                                      ability.

                                      Any ideas?

                                      ----- Original Message -----
                                      From: <mynex2k1@...>
                                      To: <pcgen@yahoogroups.com>
                                      Sent: Wednesday, October 31, 2001 7:02 PM
                                      Subject: [pcgen] Re: [BUG] Missing spells on character sheet


                                      >
                                      > Would this work for something like this?
                                      >
                                      > |FOR.min,max,%EQUIPMENT|
                                      >
                                      > SKILLS
                                      > SA
                                      > etc??
                                      >
                                      > Mynex
                                      >
                                      > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                      > > hmmm Didn't think about this. How about making the format:
                                      > > |FOR.min,max,%text|
                                      > > and then anywhere in the body of the loop that you put %text it
                                      > would
                                      > > access that loop number?
                                      > >
                                      > > So you example would be like this:
                                      > > |FOR.min,max,%class|
                                      > > |FOR.min,max,%level|
                                      > > |SPELLCLASSCAST%class.%level|
                                      > > |ENDFOR|
                                      > > |ENDFOR|
                                      > > and anything else you would want to add in the middle with the mins
                                      > > and maxes set to whatever you want. And the max value for the
                                      > second
                                      > > loop could contain %class in it so that you could loop through
                                      > > different amounts each time. How's that sound?
                                      > >
                                      > >
                                      > > That sounds pretty good to me. basically you would name the
                                      > variable
                                      > > for each loop you use and can access any of them anytime. Still
                                      > > should be easy for me to do. I think I'm actually getting use
                                      > from
                                      > > my compilers class right now. Thats just wrong :) A class like
                                      > > compilers should never be useful.
                                      > >
                                      > >
                                      > > > But how would I choose which index is which?
                                      > > >
                                      > > > ie.
                                      > > > SPELLCLASSCASTx.y
                                      > > >
                                      > > > Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need to
                                      > be
                                      > > > able to specify |SPELLCLASSCAST%.%| perhaps by |SPELLCLASSCAST%1.%
                                      > > 2|?
                                      > > >
                                      > > > -ROG
                                      > > > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                      > > > > I'vve actually been thinking about a way to do this and I think
                                      > > > I'll
                                      > > > > loook at it tonight. Hopefully the syntax won't have to be
                                      > > changed
                                      > > > > at all. It would simply use recursion and each loop would go
                                      > > until
                                      > > > > it reached an end of loop statement. The most recent loop
                                      > would
                                      > > > stop
                                      > > > > and then the next most recent loop would continue until it
                                      > > reached
                                      > > > > the next end of loop.
                                      >
                                      >
                                      >
                                      > To unsubscribe from this group, send an email to:
                                      > pcgen-unsubscribe@egroups.com
                                      >
                                      >
                                      >
                                      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                                      >
                                      >
                                    • merton_monk@yahoo.com
                                      What you suggest makes a lot of sense. Can you leave the current way FOR and DFOR loops work so we don t break existing character sheets? Not a requirement,
                                      Message 18 of 30 , Oct 31, 2001
                                        What you suggest makes a lot of sense. Can you leave the current way
                                        FOR and DFOR loops work so we don't break existing character sheets?
                                        Not a requirement, but it would be nice. Maybe have your new nested
                                        loops called NFOR. You might need to have it be
                                        |NFOR.min.max.exists| since sometimes you want to loop from min to
                                        max no matter what, sometimes you only want to loop from min to
                                        Math.max(max,number of objects in requested object list). That's the
                                        last token in the current FOR loop. Maybe |ENDNFOR| would be better
                                        as the terminating token, but |ENDLOOP| is fine.

                                        -Bryan

                                        --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                        > Ok, I've looked at changing loops to allow nested ones and I think
                                        I
                                        > can do it. But it would involve a fairly extensive rewrite of how
                                        > loops work and their syntax. But in the end it would allow loops
                                        to
                                        > be much more flexible. here's what I'm thinking. Change
                                        > |FOR.min,max,perLine,phrase, startLine,endLine,exists|
                                        > to
                                        > |FOR.min,max|
                                        > Anything you want here.
                                        > |ENDLOOP|
                                        >
                                        > Basically what I would do is call a function that loops through all
                                        > the enclosed text and anywhere it finds a % it would replace it
                                        with
                                        > the current loop number. And if it came upon another FOR statement
                                        > it would call itself and anywhere it encoutered the % in that loop
                                        it
                                        > would use that loops value. and each loop would end when it gets
                                        to
                                        > the endloop. This would allow for a ton more flexibility since you
                                        > could have loops that had more than just one line of stuff in
                                        them.
                                        > And of course min and max could be any number or any of the COUNT[]
                                        > statements.
                                        >
                                        > So please send me your comments on this idea. I will be taking a
                                        > break for a while and will probably start coding after that. And
                                        > most likely if I do this I will set up some logicc where if it
                                        finds
                                        > the old FOR code it would use that instead of this so that old
                                        sheets
                                        > would still work.
                                        >
                                        >
                                        > > I'vve actually been thinking about a way to do this and I think
                                        > I'll
                                        > > loook at it tonight. Hopefully the syntax won't have to be
                                        changed
                                        > > at all. It would simply use recursion and each loop would go
                                        until
                                        > > it reached an end of loop statement. The most recent loop would
                                        > stop
                                        > > and then the next most recent loop would continue until it
                                        reached
                                        > > the next end of loop.
                                        > >
                                        > > > 2 levels should be fine for just about anything I can think of.
                                        > > >
                                        > > > We just need a new '%' for the other loop counter.
                                        > > >
                                        > > > '#' or '$' or '@' maybe?
                                        > > >
                                        > > > Or %1 and %2 (as long as % still works :-) )
                                        > > >
                                        > > > -ROG
                                        > > >
                                        > > > --- In pcgen@y..., merton_monk@y... wrote:
                                        > > > > Don't bother - I'll try to get the 2 levels of for loops done
                                        > > this
                                        > > > > weekend so you can do it much more simply. I'll let you know
                                        > the
                                        > > > > syntax as soon as I figure it out... :)
                                        > > > >
                                        > > > > -Bryan
                                      • merton_monk@yahoo.com
                                        How about something like ... which would more closely resemble what you d expect in a language (for x=2 to 6 step 2) Then within the body of the loop
                                        Message 19 of 30 , Oct 31, 2001
                                          How about something like
                                          |NFOR.variablename.min.max.step.exists|
                                          which would more closely resemble what you'd expect in a language
                                          (for x=2 to 6 step 2)

                                          Then within the body of the loop %variablename would be replaced with
                                          the current value of the variable. A simple hashmap could do this
                                          nicely.

                                          -Bryan

                                          --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                          > hmmm Didn't think about this. How about making the format:
                                          > |FOR.min,max,%text|
                                          > and then anywhere in the body of the loop that you put %text it
                                          would
                                          > access that loop number?
                                          >
                                          > So you example would be like this:
                                          > |FOR.min,max,%class|
                                          > |FOR.min,max,%level|
                                          > |SPELLCLASSCAST%class.%level|
                                          > |ENDFOR|
                                          > |ENDFOR|
                                          > and anything else you would want to add in the middle with the mins
                                          > and maxes set to whatever you want. And the max value for the
                                          second
                                          > loop could contain %class in it so that you could loop through
                                          > different amounts each time. How's that sound?
                                          >
                                          >
                                          > That sounds pretty good to me. basically you would name the
                                          variable
                                          > for each loop you use and can access any of them anytime. Still
                                          > should be easy for me to do. I think I'm actually getting use
                                          from
                                          > my compilers class right now. Thats just wrong :) A class like
                                          > compilers should never be useful.
                                          >
                                          >
                                          > > But how would I choose which index is which?
                                          > >
                                          > > ie.
                                          > > SPELLCLASSCASTx.y
                                          > >
                                          > > Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need to
                                          be
                                          > > able to specify |SPELLCLASSCAST%.%| perhaps by |SPELLCLASSCAST%1.%
                                          > 2|?
                                          > >
                                          > > -ROG
                                          > > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                          > > > I'vve actually been thinking about a way to do this and I think
                                          > > I'll
                                          > > > loook at it tonight. Hopefully the syntax won't have to be
                                          > changed
                                          > > > at all. It would simply use recursion and each loop would go
                                          > until
                                          > > > it reached an end of loop statement. The most recent loop
                                          would
                                          > > stop
                                          > > > and then the next most recent loop would continue until it
                                          > reached
                                          > > > the next end of loop.
                                        • merton_monk@yahoo.com
                                          I think you d have something like (using my suggested syntax...) ... |EQ%x.WT| ... that kind of idea (%x means replace with value of x). -Bryan ...
                                          Message 20 of 30 , Oct 31, 2001
                                            I think you'd have something like (using my suggested syntax...)
                                            |FOR.x.0.COUNT[EQUIPMENT].1.1|
                                            <td>|EQ%x.WT|</td>
                                            |ENDFOR|
                                            that kind of idea (%x means replace with value of x).

                                            -Bryan

                                            --- In pcgen@y..., mynex2k1@y... wrote:
                                            >
                                            > Would this work for something like this?
                                            >
                                            > |FOR.min,max,%EQUIPMENT|
                                            >
                                            > SKILLS
                                            > SA
                                            > etc??
                                            >
                                            > Mynex
                                            >
                                            > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                            > > hmmm Didn't think about this. How about making the format:
                                            > > |FOR.min,max,%text|
                                            > > and then anywhere in the body of the loop that you put %text it
                                            > would
                                            > > access that loop number?
                                            > >
                                            > > So you example would be like this:
                                            > > |FOR.min,max,%class|
                                            > > |FOR.min,max,%level|
                                            > > |SPELLCLASSCAST%class.%level|
                                            > > |ENDFOR|
                                            > > |ENDFOR|
                                            > > and anything else you would want to add in the middle with the
                                            mins
                                            > > and maxes set to whatever you want. And the max value for the
                                            > second
                                            > > loop could contain %class in it so that you could loop through
                                            > > different amounts each time. How's that sound?
                                            > >
                                            > >
                                            > > That sounds pretty good to me. basically you would name the
                                            > variable
                                            > > for each loop you use and can access any of them anytime. Still
                                            > > should be easy for me to do. I think I'm actually getting use
                                            > from
                                            > > my compilers class right now. Thats just wrong :) A class like
                                            > > compilers should never be useful.
                                            > >
                                            > >
                                            > > > But how would I choose which index is which?
                                            > > >
                                            > > > ie.
                                            > > > SPELLCLASSCASTx.y
                                            > > >
                                            > > > Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need
                                            to
                                            > be
                                            > > > able to specify |SPELLCLASSCAST%.%| perhaps by |SPELLCLASSCAST%
                                            1.%
                                            > > 2|?
                                            > > >
                                            > > > -ROG
                                            > > > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                            > > > > I'vve actually been thinking about a way to do this and I
                                            think
                                            > > > I'll
                                            > > > > loook at it tonight. Hopefully the syntax won't have to be
                                            > > changed
                                            > > > > at all. It would simply use recursion and each loop would go
                                            > > until
                                            > > > > it reached an end of loop statement. The most recent loop
                                            > would
                                            > > > stop
                                            > > > > and then the next most recent loop would continue until it
                                            > > reached
                                            > > > > the next end of loop.
                                          • Mark Hulsman
                                            I think this will be how I implement it. Except I will go with ... I used commas since periods usually aren t used for seperating stuff like that and I put
                                            Message 21 of 30 , Oct 31, 2001
                                              I think this will be how I implement it. Except I will go with
                                              |FOR,%var,min,max,step,exists| and |ENDFOR|.

                                              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. I have
                                              begun to code it already. Basically I have made a node class that
                                              can be used to make a tree structure of FORs. Each node will contain
                                              all the lines inside that loop including any more nodes for more
                                              loops. Right now I am writing a recursive method to take the lines
                                              and turn them into this tree. Then I will write a recursive method
                                              that replaces the tokens just like the current code does and also
                                              calls itself for any loops it needs to execute. I have it well
                                              planned out and should finish fairly quickly since this is the same
                                              kinds of stuff I had to do in my compilers class.

                                              Oh and one more thing, if it doesn't follow the new format for FORs
                                              it will leave the line as it is and execute it like the old FOR. And
                                              as its written the |FOR| has to be on its own line in the file and
                                              the |ENDFOR| also has to be on its own line.

                                              > How about something like
                                              > |NFOR.variablename.min.max.step.exists|
                                              > which would more closely resemble what you'd expect in a language
                                              > (for x=2 to 6 step 2)
                                              >
                                              > Then within the body of the loop %variablename would be replaced
                                              with
                                              > the current value of the variable. A simple hashmap could do this
                                              > nicely.
                                              >
                                              > -Bryan
                                              >
                                              > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                              > > hmmm Didn't think about this. How about making the format:
                                              > > |FOR.min,max,%text|
                                              > > and then anywhere in the body of the loop that you put %text it
                                              > would
                                              > > access that loop number?
                                              > >
                                              > > So you example would be like this:
                                              > > |FOR.min,max,%class|
                                              > > |FOR.min,max,%level|
                                              > > |SPELLCLASSCAST%class.%level|
                                              > > |ENDFOR|
                                              > > |ENDFOR|
                                              > > and anything else you would want to add in the middle with the
                                              mins
                                              > > and maxes set to whatever you want. And the max value for the
                                              > second
                                              > > loop could contain %class in it so that you could loop through
                                              > > different amounts each time. How's that sound?
                                              > >
                                              > >
                                              > > That sounds pretty good to me. basically you would name the
                                              > variable
                                              > > for each loop you use and can access any of them anytime. Still
                                              > > should be easy for me to do. I think I'm actually getting use
                                              > from
                                              > > my compilers class right now. Thats just wrong :) A class like
                                              > > compilers should never be useful.
                                              > >
                                              > >
                                              > > > But how would I choose which index is which?
                                              > > >
                                              > > > ie.
                                              > > > SPELLCLASSCASTx.y
                                              > > >
                                              > > > Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need
                                              to
                                              > be
                                              > > > able to specify |SPELLCLASSCAST%.%| perhaps by |SPELLCLASSCAST%
                                              1.%
                                              > > 2|?
                                              > > >
                                              > > > -ROG
                                              > > > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                              > > > > I'vve actually been thinking about a way to do this and I
                                              think
                                              > > > I'll
                                              > > > > loook at it tonight. Hopefully the syntax won't have to be
                                              > > changed
                                              > > > > at all. It would simply use recursion and each loop would go
                                              > > until
                                              > > > > it reached an end of loop statement. The most recent loop
                                              > would
                                              > > > stop
                                              > > > > and then the next most recent loop would continue until it
                                              > > reached
                                              > > > > the next end of loop.
                                            • Mark Hulsman
                                              Well I ve finished the code that parses all the loops in the sheet and I just thought of one thing I forgot. Should the loop be for(x = min; x
                                              Message 22 of 30 , Oct 31, 2001
                                                Well I've finished the code that parses all the loops in the sheet
                                                and I just thought of one thing I forgot. Should the loop be
                                                for(x = min; x <= max; x += step)
                                                or
                                                for(x = min; x < max; x += step)

                                                I think its the first one so I'll code it that way, if it should be
                                                the second its a minor change that I'll make when I know for sure.

                                                > I think this will be how I implement it. Except I will go with
                                                > |FOR,%var,min,max,step,exists| and |ENDFOR|.
                                                >
                                                > 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. I
                                                have
                                                > begun to code it already. Basically I have made a node class that
                                                > can be used to make a tree structure of FORs. Each node will
                                                contain
                                                > all the lines inside that loop including any more nodes for more
                                                > loops. Right now I am writing a recursive method to take the lines
                                                > and turn them into this tree. Then I will write a recursive method
                                                > that replaces the tokens just like the current code does and also
                                                > calls itself for any loops it needs to execute. I have it well
                                                > planned out and should finish fairly quickly since this is the same
                                                > kinds of stuff I had to do in my compilers class.
                                                >
                                                > Oh and one more thing, if it doesn't follow the new format for FORs
                                                > it will leave the line as it is and execute it like the old FOR.
                                                And
                                                > as its written the |FOR| has to be on its own line in the file and
                                                > the |ENDFOR| also has to be on its own line.
                                                >
                                                > > How about something like
                                                > > |NFOR.variablename.min.max.step.exists|
                                                > > which would more closely resemble what you'd expect in a language
                                                > > (for x=2 to 6 step 2)
                                                > >
                                                > > Then within the body of the loop %variablename would be replaced
                                                > with
                                                > > the current value of the variable. A simple hashmap could do
                                                this
                                                > > nicely.
                                                > >
                                                > > -Bryan
                                                > >
                                                > > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                                > > > hmmm Didn't think about this. How about making the format:
                                                > > > |FOR.min,max,%text|
                                                > > > and then anywhere in the body of the loop that you put %text it
                                                > > would
                                                > > > access that loop number?
                                                > > >
                                                > > > So you example would be like this:
                                                > > > |FOR.min,max,%class|
                                                > > > |FOR.min,max,%level|
                                                > > > |SPELLCLASSCAST%class.%level|
                                                > > > |ENDFOR|
                                                > > > |ENDFOR|
                                                > > > and anything else you would want to add in the middle with the
                                                > mins
                                                > > > and maxes set to whatever you want. And the max value for the
                                                > > second
                                                > > > loop could contain %class in it so that you could loop through
                                                > > > different amounts each time. How's that sound?
                                                > > >
                                                > > >
                                                > > > That sounds pretty good to me. basically you would name the
                                                > > variable
                                                > > > for each loop you use and can access any of them anytime.
                                                Still
                                                > > > should be easy for me to do. I think I'm actually getting use
                                                > > from
                                                > > > my compilers class right now. Thats just wrong :) A class
                                                like
                                                > > > compilers should never be useful.
                                                > > >
                                                > > >
                                                > > > > But how would I choose which index is which?
                                                > > > >
                                                > > > > ie.
                                                > > > > SPELLCLASSCASTx.y
                                                > > > >
                                                > > > > Currently I use |SPELLCLASSCAST0.%| inside a loop, but I need
                                                > to
                                                > > be
                                                > > > > able to specify |SPELLCLASSCAST%.%| perhaps by
                                                |SPELLCLASSCAST%
                                                > 1.%
                                                > > > 2|?
                                                > > > >
                                                > > > > -ROG
                                                > > > > --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                                > > > > > I'vve actually been thinking about a way to do this and I
                                                > think
                                                > > > > I'll
                                                > > > > > loook at it tonight. Hopefully the syntax won't have to be
                                                > > > changed
                                                > > > > > at all. It would simply use recursion and each loop would
                                                go
                                                > > > until
                                                > > > > > it reached an end of loop statement. The most recent loop
                                                > > would
                                                > > > > stop
                                                > > > > > and then the next most recent loop would continue until it
                                                > > > reached
                                                > > > > > the next end of loop.
                                              • STILES, BRAD
                                                ... So this would equivalent to a (BASIC) construct of for %class = min to max for %level = min to max next next correct? May I also suggest an optional STEP
                                                Message 23 of 30 , Nov 1, 2001
                                                  > -----Original Message-----
                                                  > From: Mark Hulsman
                                                  >
                                                  > So you example would be like this:
                                                  > |FOR.min,max,%class|
                                                  > |FOR.min,max,%level|
                                                  > |SPELLCLASSCAST%class.%level|
                                                  > |ENDFOR|
                                                  > |ENDFOR|

                                                  So this would equivalent to a (BASIC) construct of

                                                  for %class = min to max
                                                  for %level = min to max
                                                  next
                                                  next

                                                  correct?

                                                  May I also suggest an optional STEP increment, so that doing dual or triple
                                                  column stuff will be easier. It might also make it a little more readable
                                                  if the loop "variable" were placed first, i.e. |FOR.class.min.max.step|

                                                  For me anyway, used to reading BASIC, Java and C/C++ loops, this is a little
                                                  more intuitive.
                                                • STILES, BRAD
                                                  ... Well, for whatever reason, my previous notes on this subject didn t go out until I logged in this morning. You are implementing all the things I need. I d
                                                  Message 24 of 30 , Nov 1, 2001
                                                    > -----Original Message-----
                                                    > From: Mark Hulsman
                                                    >
                                                    >
                                                    > I think this will be how I implement it. Except I will go with
                                                    > |FOR,%var,min,max,step,exists| and |ENDFOR|.

                                                    Well, for whatever reason, my previous notes on this subject didn't go out
                                                    until I logged in this morning. You are implementing all the things I need.

                                                    I'd still suggest changing the name of the construct to LOOP, though. It
                                                    might be a little more intuitive for non-programmers, and that way you don't
                                                    have to bother checking to see which one it is.

                                                    Brad
                                                  • STILES, BRAD
                                                    ... I agree that it should be the former. Most people would expect the bounds to be inclusive. Brad
                                                    Message 25 of 30 , Nov 1, 2001
                                                      > -----Original Message-----
                                                      > From: Mark Hulsman
                                                      >
                                                      > Well I've finished the code that parses all the loops in the sheet
                                                      > and I just thought of one thing I forgot. Should the loop be
                                                      > for(x = min; x <= max; x += step)
                                                      > or
                                                      > for(x = min; x < max; x += step)

                                                      I agree that it should be the former. Most people would expect the bounds
                                                      to be inclusive.

                                                      Brad
                                                    • merton_monk@yahoo.com
                                                      I think you ve got it right. -Bryan
                                                      Message 26 of 30 , Nov 1, 2001
                                                        I think you've got it right.

                                                        -Bryan

                                                        --- In pcgen@y..., "Mark Hulsman" <hulsmanm@p...> wrote:
                                                        > Well I've finished the code that parses all the loops in the sheet
                                                        > and I just thought of one thing I forgot. Should the loop be
                                                        > for(x = min; x <= max; x += step)
                                                        > or
                                                        > for(x = min; x < max; x += step)
                                                        >
                                                        > I think its the first one so I'll code it that way, if it should be
                                                        > the second its a minor change that I'll make when I know for sure.
                                                        >
                                                      • Scott Ellsworth
                                                        Very good ideas overall, but I had one suggestion - escape your variable names in the text rather than having them sit alone after the %. ... Make it ...
                                                        Message 27 of 30 , Nov 1, 2001
                                                          Very good ideas overall, but I had one suggestion - escape your variable
                                                          names in the text rather than having them sit alone after the %.

                                                          At 03:50 AM 11/1/2001 +0000, Mark Hulsman wrote:
                                                          >Basically what I would do is call a function that loops through all
                                                          >the enclosed text and anywhere it finds a % it would replace it with
                                                          >the current loop number.

                                                          Make your life easier - require the variable to be escaped:

                                                          >|FOR.min,max|
                                                          >Anything you want here.
                                                          >|ENDLOOP|

                                                          Make it
                                                          |FOR.min,max,number|
                                                          Anything you want here.
                                                          |ENDLOOP|

                                                          Example:
                                                          |FOR.1,2,0|
                                                          Outer. %{0}
                                                          |FOR.3,4,1|
                                                          Inner 0. %{0}
                                                          Inner 1. %{1}
                                                          |ENDLOOP|
                                                          |ENDLOOP|


                                                          Outer. %{1}
                                                          Inner 0. %{1}
                                                          Inner 1. %{3}
                                                          Inner 0. %{1}
                                                          Inner 1. %{4}
                                                          Outer. %{2}
                                                          Inner 0. %{2}
                                                          Inner 1. %{3}
                                                          Inner 0. %{2}
                                                          Inner 1. %{4}

                                                          Why put the name in braces rather than just saying %0? Because somebody is
                                                          going to want to have

                                                          %file
                                                          and
                                                          %filepath
                                                          in the text, and it is a pain to disambiguate them.

                                                          It is trivially easy to know how to substitute %{file} and %{filepath}

                                                          (I know - I wrote a language that was based on the DOS batch language,
                                                          which then became a real compiled language, and this was a tremendous pain.

                                                          Whatever you do, do NOT put the variable name in the for declaration in the
                                                          same form as the escaped text:

                                                          FOR %{x},1,2
                                                          ENDFOR

                                                          You will end up having to carefully escape each and every item in the line,
                                                          rather than just doing a text replacement before parsing it.

                                                          Scott
                                                          Scott Ellsworth
                                                          scott@...
                                                        • 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 28 of 30 , Nov 1, 2001
                                                            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 29 of 30 , Nov 1, 2001
                                                              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 30 of 30 , Nov 1, 2001
                                                                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.