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

Re: Bcx 6.0.2+not recognizing ASC as prototype

Expand Messages
  • Brother Gabriel-Marie
    Hello y all! I have program called TreasureCalc which I have not worked on for many months. When I left off, it compiled perfectly. But now I get this
    Message 1 of 17 , May 1, 2010
    View Source
    • 0 Attachment
      Hello y'all!

      I have program called TreasureCalc which I have not worked on for many
      months. When I left off, it compiled perfectly. But now I get this error:

      TreasureCalc.c(3720): warning #2027: Missing prototype for 'ASC'.
      TreasureCalc.c(3730): error #2069: Initializer must be constant.

      This is in WindowsXP, using BCX 6.0.3
      I get the same error with 6.0.2, so I tried BC20090802 and it compiled
      just fine.

      Just FYI, there is a catch somewhere in the new versions with the ASC
      function.

      - Brother Gabriel-Marie
    • wmhalsdorf
      ... It would help if you supplied the line of BCX code since the following translates/compiles correctly with 6.0.3 PRINT ASC( A ) PAUSE
      Message 2 of 17 , May 1, 2010
      View Source
      • 0 Attachment
        --- In BCX@yahoogroups.com, Brother Gabriel-Marie <brgabriel@...> wrote:
        >
        > Hello y'all!
        >
        > I have program called TreasureCalc which I have not worked on for many
        > months. When I left off, it compiled perfectly. But now I get this error:
        >
        > TreasureCalc.c(3720): warning #2027: Missing prototype for 'ASC'.
        > TreasureCalc.c(3730): error #2069: Initializer must be constant.
        >
        > This is in WindowsXP, using BCX 6.0.3
        > I get the same error with 6.0.2, so I tried BC20090802 and it compiled
        > just fine.
        >
        > Just FYI, there is a catch somewhere in the new versions with the ASC
        > function.
        >
        > - Brother Gabriel-Marie
        >
        It would help if you supplied the line of BCX code since
        the following translates/compiles correctly with 6.0.3

        PRINT ASC("A")
        PAUSE
      • Brother Gabriel-Marie
        ... Mr. Halsdorf, here is the sub. I am running PellesC 5. Like I said, it compiles with BCX 20090802. Sub InitKeys() Set sAccel[] As ACCEL FVIRTKEY,
        Message 3 of 17 , May 5, 2010
        View Source
        • 0 Attachment
          > TreasureCalc.c(3720): warning #2027: Missing prototype for 'ASC'.
          > TreasureCalc.c(3730): error #2069: Initializer must be constant.

          >It would help if you supplied the line of BCX code since
          >the following translates/compiles correctly with 6.0.3

          Mr. Halsdorf, here is the sub. I am running PellesC 5. Like I said,
          it compiles with BCX 20090802.

          Sub InitKeys()
          Set sAccel[] As ACCEL
          FVIRTKEY, VK_TAB, ID_Advance,
          FVIRTKEY, VK_RETURN, ID_Advance,
          FSHIFT | FVIRTKEY, VK_SPACE, ID_ClearOne,
          FCONTROL | FVIRTKEY,VK_SPACE, ID_Clear,
          FSHIFT | FCONTROL | FVIRTKEY, VK_SPACE, ID_ClearAll,
          FVIRTKEY, VK_DOWN, ID_Down,
          FVIRTKEY, VK_UP, ID_Up,
          FVIRTKEY, VK_LEFT, ID_Left,
          FVIRTKEY, VK_RIGHT, ID_Right,
          FVIRTKEY, VK_ADD, ID_Add,
          FSHIFT | FVIRTKEY, VK_OEM_PLUS, ID_Add,
          FVIRTKEY, VK_SUBTRACT, ID_Subtract,
          FVIRTKEY, VK_OEM_MINUS, ID_Subtract,
          FVIRTKEY, VK_F1, ID_Help,
          FVIRTKEY, VK_F3, ID_Handbook,

          FCONTROL | FVIRTKEY, ASC("S"), ID_Save, 'don't
          forget to put a comma a the end if there is another fcontrol following
          FCONTROL | FVIRTKEY, ASC("N"), ID_New,
          FCONTROL | FVIRTKEY, ASC("E"), ID_Edit,
          FCONTROL | FVIRTKEY, ASC("X"), ID_Exit,
          FCONTROL | FVIRTKEY, ASC("T"), ID_SaveAsText,
          FCONTROL | FVIRTKEY, ASC("O"), ID_Options,
          FCONTROL | FVIRTKEY, ASC("I"), ID_Info,
          FCONTROL | FVIRTKEY, ASC("Z"), ID_UndoLast,
          FCONTROL | FVIRTKEY, ASC("Y"), ID_Redo,
          FCONTROL | FVIRTKEY, ASC("L"), ID_SaveToC
          End Set
          CalcKeys = CreateAcceleratorTable(sAccel,25)
          End Sub


          [Non-text portions of this message have been removed]
        • wmhalsdorf
          ... You are making a call to a function from within a set statement which is not possible. That is why there is no translation to a call. You might consider
          Message 4 of 17 , May 5, 2010
          View Source
          • 0 Attachment
            --- In BCX@yahoogroups.com, Brother Gabriel-Marie <brgabriel@...> wrote:
            >
            > > TreasureCalc.c(3720): warning #2027: Missing prototype for 'ASC'.
            > > TreasureCalc.c(3730): error #2069: Initializer must be constant.
            >
            > >It would help if you supplied the line of BCX code since
            > >the following translates/compiles correctly with 6.0.3
            >
            > Mr. Halsdorf, here is the sub. I am running PellesC 5. Like I said,
            > it compiles with BCX 20090802.
            >
            > Sub InitKeys()
            > Set sAccel[] As ACCEL
            > FVIRTKEY, VK_TAB, ID_Advance,
            > FVIRTKEY, VK_RETURN, ID_Advance,
            > FSHIFT | FVIRTKEY, VK_SPACE, ID_ClearOne,
            > FCONTROL | FVIRTKEY,VK_SPACE, ID_Clear,
            > FSHIFT | FCONTROL | FVIRTKEY, VK_SPACE, ID_ClearAll,
            > FVIRTKEY, VK_DOWN, ID_Down,
            > FVIRTKEY, VK_UP, ID_Up,
            > FVIRTKEY, VK_LEFT, ID_Left,
            > FVIRTKEY, VK_RIGHT, ID_Right,
            > FVIRTKEY, VK_ADD, ID_Add,
            > FSHIFT | FVIRTKEY, VK_OEM_PLUS, ID_Add,
            > FVIRTKEY, VK_SUBTRACT, ID_Subtract,
            > FVIRTKEY, VK_OEM_MINUS, ID_Subtract,
            > FVIRTKEY, VK_F1, ID_Help,
            > FVIRTKEY, VK_F3, ID_Handbook,
            >
            > FCONTROL | FVIRTKEY, ASC("S"), ID_Save, 'don't
            > forget to put a comma a the end if there is another fcontrol following
            > FCONTROL | FVIRTKEY, ASC("N"), ID_New,
            > FCONTROL | FVIRTKEY, ASC("E"), ID_Edit,
            > FCONTROL | FVIRTKEY, ASC("X"), ID_Exit,
            > FCONTROL | FVIRTKEY, ASC("T"), ID_SaveAsText,
            > FCONTROL | FVIRTKEY, ASC("O"), ID_Options,
            > FCONTROL | FVIRTKEY, ASC("I"), ID_Info,
            > FCONTROL | FVIRTKEY, ASC("Z"), ID_UndoLast,
            > FCONTROL | FVIRTKEY, ASC("Y"), ID_Redo,
            > FCONTROL | FVIRTKEY, ASC("L"), ID_SaveToC
            > End Set
            > CalcKeys = CreateAcceleratorTable(sAccel,25)
            > End Sub
            >
            >
            > [Non-text portions of this message have been removed]
            >

            You are making a call to a function from within a set statement
            which is not possible. That is why there is no translation to a
            call. You might consider adding an enum for the keys.
          • wmhalsdorf
            ... ENUM ASC_A = 65 ASC_B ASC_C ..... ASC_Z ASC_a = 97 ASC_z END ENUM Replace the ASC( A ) with ASC_A etc.
            Message 5 of 17 , May 5, 2010
            View Source
            • 0 Attachment
              >
              > You are making a call to a function from within a set statement
              > which is not possible. That is why there is no translation to a
              > call. You might consider adding an enum for the keys.
              >


              ENUM
              ASC_A = 65
              ASC_B
              ASC_C
              .....
              ASC_Z
              ASC_a = 97
              ASC_z
              END ENUM

              Replace the ASC("A") with ASC_A etc.
            • Michael
              ... Hi Wayne, I made using ASC within a SET legal back when I changed ASC to formulate at translate time instead of run time. I ll have to do a comparison on
              Message 6 of 17 , May 5, 2010
              View Source
              • 0 Attachment
                --- In BCX@yahoogroups.com, "wmhalsdorf" <wmhalsdorf@...> wrote:
                >
                > >
                > > You are making a call to a function from within a set statement
                > > which is not possible. That is why there is no translation to a
                > > call. You might consider adding an enum for the keys.
                > >

                Hi Wayne,

                I made using ASC within a SET legal back when I changed ASC to formulate at translate time instead of run time. I'll have to do a comparison on the newest version to see what changed.

                Thanks,
                Mike H.
              • John Spikowski
                ... Nice to see you posting to the list again. James Fuller has some momentum going with a cross platform converter using wxWidigets on the forum if your
                Message 7 of 17 , May 6, 2010
                View Source
                • 0 Attachment
                  > Hi Wayne,
                  >
                  > I made using ASC within a SET legal back when I changed ASC to
                  > formulate at translate time instead of run time. I'll have to do a
                  > comparison on the newest version to see what changed.
                  >
                  > Thanks,
                  > Mike H.

                  Nice to see you posting to the list again. James Fuller has some momentum
                  going with a cross platform converter using wxWidigets on the forum if your
                  interested.


                  John
                • wmhalsdorf
                  ... I disabled it since it was translating more than just ASC(). Will have to come up with something else.
                  Message 8 of 17 , May 6, 2010
                  View Source
                  • 0 Attachment
                    --- In BCX@yahoogroups.com, "Michael" <mikehg_67@...> wrote:
                    >
                    >
                    >
                    > --- In BCX@yahoogroups.com, "wmhalsdorf" <wmhalsdorf@> wrote:
                    > >
                    > > >
                    > > > You are making a call to a function from within a set statement
                    > > > which is not possible. That is why there is no translation to a
                    > > > call. You might consider adding an enum for the keys.
                    > > >
                    >
                    > Hi Wayne,
                    >
                    > I made using ASC within a SET legal back when I changed ASC to formulate at translate time instead of run time. I'll have to do a comparison on the newest version to see what changed.
                    >
                    > Thanks
                    > Mike H.
                    >
                    I disabled it since it was translating more than just ASC().
                    Will have to come up with something else.
                  • Michael
                    ... Thanks John, I m still quite busy still with work but I m glad to see there is still some activity. Mike H.
                    Message 9 of 17 , May 6, 2010
                    View Source
                    • 0 Attachment
                      --- In BCX@yahoogroups.com, "John Spikowski" <johnspikowski@...> wrote:
                      >
                      > > Hi Wayne,
                      > >
                      > > I made using ASC within a SET legal back when I changed ASC to
                      > > formulate at translate time instead of run time. I'll have to do a
                      > > comparison on the newest version to see what changed.
                      > >
                      > > Thanks,
                      > > Mike H.
                      >
                      > Nice to see you posting to the list again. James Fuller has some momentum
                      > going with a cross platform converter using wxWidigets on the forum if your
                      > interested.
                      >
                      Thanks John,
                      I'm still quite busy still with work but I'm glad to see there is still some activity.

                      Mike H.
                    • John Spikowski
                      ... While you were gone, Armando and JohnJ made great progress giving James a rolling start with the BcxWx version.
                      Message 10 of 17 , May 6, 2010
                      View Source
                      • 0 Attachment
                        > Thanks John,
                        > I'm still quite busy still with work but I'm glad to see there is still
                        > some activity.
                        >
                        > Mike H.

                        While you were gone, Armando and JohnJ made great progress giving James a
                        rolling start with the BcxWx version.
                      • Michael
                        ... It s a shame they went with C++. I figured that abomination would have faded out years ago but it just keeps hanging around :-) Thanks, Mike H.
                        Message 11 of 17 , May 6, 2010
                        View Source
                        • 0 Attachment
                          --- In BCX@yahoogroups.com, "John Spikowski" <johnspikowski@...> wrote:
                          >
                          > > Thanks John,
                          > > I'm still quite busy still with work but I'm glad to see there is still
                          > > some activity.
                          > >
                          > > Mike H.
                          >
                          > While you were gone, Armando and JohnJ made great progress giving James a
                          > rolling start with the BcxWx version.
                          >

                          It's a shame they went with C++. I figured that abomination would have faded out years ago but it just keeps hanging around :-)

                          Thanks,
                          Mike H.
                        • John Spikowski
                          ... + 1 Prevents me from using wxWidgets with ScriptBasic. (ANSI C centric) I think the OOP craze must have given C++ a second life.
                          Message 12 of 17 , May 6, 2010
                          View Source
                          • 0 Attachment
                            > It's a shame they went with C++. I figured that abomination would have
                            > faded out years ago but it just keeps hanging around :-)
                            >
                            > Thanks,
                            > Mike H.

                            + 1

                            Prevents me from using wxWidgets with ScriptBasic. (ANSI C centric)

                            I think the OOP craze must have given C++ a second life.
                          • IW
                            ________________________________ From: Michael To: BCX@yahoogroups.com Sent: Fri, May 7, 2010 12:38:46 AM Subject: [BCX] Re: Bcx
                            Message 13 of 17 , May 8, 2010
                            View Source
                            • 0 Attachment
                              ________________________________
                              From: Michael <mikehg_67@...>
                              To: BCX@yahoogroups.com
                              Sent: Fri, May 7, 2010 12:38:46 AM
                              Subject: [BCX] Re: Bcx 6.0.2+not recognizing ASC as prototype Follow up to last reply


                              "C++. ... that abomination would have faded out years ago".

                              "abomination" is too kind a word. How about "that unweiledy monstrocity"?

                              "faded out" is also not quite expressive.

                              How about "buried" with an epitaph "Not to be exhumed ever"?

                              --- In BCX@yahoogroups. com, "John Spikowski" <johnspikowski@ ...> wrote:
                              >
                              > > Thanks John,
                              > > I'm still quite busy still with work but I'm glad to see there is still
                              > > some activity.
                              > >
                              > > Mike H.
                              >
                              > While you were gone, Armando and JohnJ made great progress giving James a
                              > rolling start with the BcxWx version.
                              >

                              It's a shame they went with C++. I figured that abomination would have faded out years ago but it just keeps hanging around :-)

                              Thanks,
                              Mike H.






                              [Non-text portions of this message have been removed]
                            • Brother Gabriel-Marie
                              ... But I have been doing this for quite awhile and it always compiled and worked before. I may be doing something wrong, but it does seem possible to do so a
                              Message 14 of 17 , May 10, 2010
                              View Source
                              • 0 Attachment
                                >You are making a call to a function from within a set statement
                                >which is not possible. That is why there is no translation to a
                                >call. You might consider adding an enum for the keys.

                                But I have been doing this for quite awhile and it always compiled and
                                worked before. I may be doing something wrong, but it does seem
                                possible to do so a few versions ago. I have done this same thing in
                                several different programs. What else was being translated before? I
                                ask so that I might ascertain whether it was affecting the behavior of
                                my programs in any way.
                              • wmhalsdorf
                                ... If you put any of BCX s reserved words inside of a SET/END SET you will see that some of them will be translated into something other than what was
                                Message 15 of 17 , May 10, 2010
                                View Source
                                • 0 Attachment
                                  --- In BCX@yahoogroups.com, Brother Gabriel-Marie <brgabriel@...> wrote:
                                  >
                                  > >You are making a call to a function from within a set statement
                                  > >which is not possible. That is why there is no translation to a
                                  > >call. You might consider adding an enum for the keys.
                                  >
                                  > But I have been doing this for quite awhile and it always compiled and
                                  > worked before. I may be doing something wrong, but it does seem
                                  > possible to do so a few versions ago. I have done this same thing in
                                  > several different programs. What else was being translated before? I
                                  > ask so that I might ascertain whether it was affecting the behavior of
                                  > my programs in any way.
                                  >
                                  If you put any of BCX's reserved words inside of a SET/END SET you
                                  will see that some of them will be translated into something other
                                  than what was intended. I just haven't come up with a way that is
                                  safe and easy to do. It is on my to do list.
                                • Michael
                                  ... It probably wasn t hurting anything in your other programs. It would only do substitutions on BCX keywords so normally is wasn t a problem but I agree
                                  Message 16 of 17 , May 11, 2010
                                  View Source
                                  • 0 Attachment
                                    --- In BCX@yahoogroups.com, Brother Gabriel-Marie <brgabriel@...> wrote:
                                    >
                                    > >You are making a call to a function from within a set statement
                                    > >which is not possible. That is why there is no translation to a
                                    > >call. You might consider adding an enum for the keys.
                                    >
                                    > But I have been doing this for quite awhile and it always compiled and
                                    > worked before. I may be doing something wrong, but it does seem
                                    > possible to do so a few versions ago. I have done this same thing in
                                    > several different programs. What else was being translated before? I
                                    > ask so that I might ascertain whether it was affecting the behavior of
                                    > my programs in any way.
                                    >

                                    It probably wasn't hurting anything in your other programs. It would only do substitutions on " BCX keywords" so normally is wasn't a problem but I agree with Wayne that we still shouldn't allow it to be handled that way. I'll add in a new fix for special cases such as that, probably won't be until next week after the family leaves :)

                                    Thanks,
                                    Mike
                                  • brother.gabriel
                                    Thank you for the explanation! I appreciate to understand. God bless.
                                    Message 17 of 17 , May 12, 2010
                                    View Source
                                    • 0 Attachment
                                      Thank you for the explanation! I appreciate to understand. God bless.

                                      --- In BCX@yahoogroups.com, "Michael" <mikehg_67@...> wrote:
                                      >
                                      >
                                      >
                                      > --- In BCX@yahoogroups.com, Brother Gabriel-Marie <brgabriel@> wrote:
                                      > >
                                      > > >You are making a call to a function from within a set statement
                                      > > >which is not possible. That is why there is no translation to a
                                      > > >call. You might consider adding an enum for the keys.
                                      > >
                                      > > But I have been doing this for quite awhile and it always compiled and
                                      > > worked before. I may be doing something wrong, but it does seem
                                      > > possible to do so a few versions ago. I have done this same thing in
                                      > > several different programs. What else was being translated before? I
                                      > > ask so that I might ascertain whether it was affecting the behavior of
                                      > > my programs in any way.
                                      > >
                                      >
                                      > It probably wasn't hurting anything in your other programs. It would only do substitutions on " BCX keywords" so normally is wasn't a problem but I agree with Wayne that we still shouldn't allow it to be handled that way. I'll add in a new fix for special cases such as that, probably won't be until next week after the family leaves :)
                                      >
                                      > Thanks,
                                      > Mike
                                      >
                                    Your message has been successfully submitted and would be delivered to recipients shortly.