Announcement

Collapse
No announcement yet.

#Compiler and conditional compiles

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

  • #Compiler and conditional compiles

    I know you can limit what compiler your code can be compiled under via the #COMPILER metastatement.
    But is there a way to detect what compiler someone is trying to compile your code under? That way parts of an INC or Example code would be ignored if the other persons compiler does not meet your requirements?

    Like Class Code in PB9, that at compile time would know the user is trying to compile under PB8, so a conditional statement would ignore any of the class code that may be included???
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    %pb_revision
    hellobasic

    Comment


    • #3
      Thank you Edwin,
      I can not find %PB_REVISION anywhere in the Help files, but I was able to figure it out due to a search on %PB_REVISION in the forums.

      Now that I know it exists, I can go about attempting to use it.

      Thanks again.

      (Hmmmm I wonder if its something to send to [email protected] ?? or if I just can't find it in the doc's, but it is there????)
      Engineer's Motto: If it aint broke take it apart and fix it

      "If at 1st you don't succeed... call it version 1.0"

      "Half of Programming is coding"....."The other 90% is DEBUGGING"

      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

      Comment


      • #4
        Originally posted by Cliff Nichols View Post
        Thank you Edwin,
        I can not find %PB_REVISION anywhere in the Help files, but I was able to figure it out due to a search on %PB_REVISION in the forums.

        Now that I know it exists, I can go about attempting to use it.

        Thanks again.

        (Hmmmm I wonder if its something to send to [email protected] ?? or if I just can't find it in the doc's, but it is there????)
        %DEF operator in help file

        James

        Comment


        • #5
          Look under "equates/Built-in numeric equates' in the index.

          PB is pretty good at hiding info which is not a regular verb or statement, but since I've been using their help files since '91 they have to work a lot harder to hide stuff from me now. (But they can still fool me once or twice per release. I'll get 'em with the 5x/9x which I ordered yesterday).


          MCM
          Michael Mattias
          Tal Systems Inc. (retired)
          Racine WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            This is a good example of the hiding technique:

            Since %pb_revision is ALWAYS defined, why are its details under %DEF ????
            Michael Mattias
            Tal Systems Inc. (retired)
            Racine WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              Thanks again guys....I would never have thought of looking under %DEF

              MCM....I got my copy yesterday, and I LOVE it!!!!

              (Although I am quickly learning why VB hid how a lot of things worked under the hood. But glad PB shows not only whats under the hood, but how to use it)
              Not too bad once I start piecing together the pieces.
              Engineer's Motto: If it aint broke take it apart and fix it

              "If at 1st you don't succeed... call it version 1.0"

              "Half of Programming is coding"....."The other 90% is DEBUGGING"

              "Document my code????" .... "WHYYY??? do you think they call it CODE? "

              Comment


              • #8
                ...I am quickly learning why VB hid how a lot of things worked under the hood
                That was a deliberate strategy on the part of Microsoft.

                And if the goal was to make so easy to use they could sell a bazillion copies, I'd say it was a successful strategy.

                MCM
                Michael Mattias
                Tal Systems Inc. (retired)
                Racine WI USA
                [email protected]
                http://www.talsystems.com

                Comment


                • #9
                  Same seems to happen with .NET.
                  Controls, controls, controls.
                  Did i mention supurb controls?

                  And then possibly Silverlight, the flash competitor.
                  Afaik also .NET based and (thus) highly 'plugable' libraries.

                  I took a peek on that today, abandoning html seems very viable to me in the future.
                  hellobasic

                  Comment


                  • #10
                    I don't disagree with it...but I do disagree with "Just Do IT" and later when you find a situation that it does not work. (Either by design, or mis-use), that you find no documentation as to "Here Is WHYYYYYY it works, and how you go about figuring out why your code does not work"

                    Which is fine if I think of it as an oil change.

                    Just Do It = We all change our oil every 3000 miles or so (no question)
                    Does not work = Something happened, but was it cause I did not change till 3500 one time?
                    Why Change your oil?? = (Bad Example since we all know oil breaks down, cludges etc...but assume you didn't and could find hardly anything telling you why except to just do it???)
                    How to fix it??? = Even if I do want to know what I did wrong so I do not do it again...how deep do I want to go? (Do I just want to be informed? or do I want to become a mechanic??? or do I want to become the scientist that created the lubrication???)

                    Engineer's Motto: If it aint broke take it apart and fix it

                    "If at 1st you don't succeed... call it version 1.0"

                    "Half of Programming is coding"....."The other 90% is DEBUGGING"

                    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                    Comment

                    Working...
                    X