Announcement

Collapse
No announcement yet.

PB10 and ASMDATA Statement variables

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PB10 and ASMDATA Statement variables

    It would appear that the following: DB, DW, DD, and DQ variables in the new ASMDATA statement are reserved! This really is annoying. Sorry, this is really annoying! Really!!!

    I think that it would make more sense to use less common variable names in the asmdata statement.

    This kind of stuff reminds me of the things that Microsoft used to do, in the '80s, with VB. Which is why I dumped VB. Every new version of VB at that time changed the way the world rotated. I remember having to re-write gobs of code because of those changes.

    I do hope that this isn't going to become a trend with PB. If it is I'm going to pack it in...go down to the beach, raise a tent and hold revival meetings!

    Thanks for letting me vent!. But as I mentioned before this is really annoying.

    Julian

  • #2
    Your first post - Welcome Julian!

    Originally posted by Julian Small View Post
    This kind of stuff reminds me of the things that Microsoft used to do, in the '80s, with VB.
    Now I begin to understand why there has been less fuss about the piracy of variable names than I expected. VBers (I'm not one) will have seen it all before and possibly considered it "part of the game".

    In this particular case it's unfortunate that the limited scope of DW, etc (only meaningful between ASMDATA and END ASMDATA) should result in compilation errors when used in other contexts.

    I would guess that the trade-off for the compiler writer is between the number of passes of the source code and the precision of error reporting.

    The naming convention which I use when I have a choice is to employ more or less HN* except for ephemerals, where just the type, or even just a single letter, is used for a variable name.

    By ephemerals I mean things like loop counters, temporary stores and variables whose only purpose is to assist in data conversion. These are always LOCALS. So dw denotes - sorry, used to denote, an ephemeral DWORD.

    *Hungarian Notation

    Comment


    • #3
      As much as I understand the angst about PB reserving new keywords, I can see no way that PB can make the product better without instituting new keywords, and because every one of us has our peccadilloes, and in that context, they are going to infringe upon someone's sensibilities.
      Thus, it's the only sensible thing for them to do.
      Rod
      "To every unsung hero in the universe
      To those who roam the skies and those who roam the earth
      To all good men of reason may they never thirst " - from "Heaven Helpt the Devil" by G. Lightfoot

      Comment


      • #4
        Hi Julian,
        Welcome to the forums!

        See this thread for other variable names, as well as other changes that may affect your previous code.

        I'm 100% with you on the annoyance response. I can agree with Rodney that PowerBASIC needs some keywords of their own, but dw and dh? - when there are literally billions of possible variable names?

        I've used, and seen used, those variables since the 1980's. I feel like I've been the recipient of an eminent domain action!

        The good news is that the list of commonly used, usurped variable names doesn't actually seem to be that long - at least in my own coding experience and recent conversion of legacy code to PBWin10. It's just a bummer that the conflict you/I ran into was on two of our long-time favorite variable name choices.

        Comment


        • #5
          Originally posted by Rodney Hicks View Post
          ...I can see no way that PB can make the product better without instituting new keywords, and because every one of us has our peccadilloes, and in that context, they are going to infringe upon someone's sensibilities...
          My personal peccadillo is to see such entities prefixed with something like "PB".

          How kinky is that.

          Comment


          • #6
            My personal preference is to see variables prefixed with PB or CH or GB, etc. <smile>

            Comment


            • #7
              BZ would be a good one too

              Comment


              • #8
                DW could be quite confusing for me.

                Comment


                • #9
                  My personal preference is to use some form of Hungarian Notation for variables. This has many other advantages in addition to resolving the current issue.
                  --
                  CAMCo - Applications Development & ICT Consultancy
                  PNG Domain Hosting

                  Comment


                  • #10
                    DB, DW, DD, and DQ are only truly 'reserved' when they are the first non-whitespace 'words' of an ASM statement.
                    Michael Mattias
                    Tal Systems Inc.
                    Racine WI USA
                    mailto:mmattias@talsystems.com
                    www.talsystems.com

                    Comment

                    Working...
                    X