Announcement

Collapse
No announcement yet.

Please help a Newbie Dummy make my brand-new PB/CC5 fly

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

  • Please help a Newbie Dummy make my brand-new PB/CC5 fly

    Hi all,

    I just bought and installed PB/CC 5.

    For decades I've been exclusively programming in MS QuickBasic. Toward the end I was asking it to do some pretty ambitious things, and it always came through.

    But QuickBasic failed to survive the leap to a new Vista machine. For me and my programming needs, it extincted.

    It wasn't hard to figure out that PowerBasic was my best choice for a new environment.

    So here I am in my new environment, and I can't get it to chew gum or count to ten. I'm the Dummy they write all those "---- for Dummies" books for. (I just can't find "PowerBasic for Dummies," or I'd have ordered it already. Any recommendations for an equivalent book or website also appreciated.)

    Could some nice PB folks send me very short, very simple, very primitive proggies that will run, do a trick or two, and then let me make it into a standalone *.exe ?

    Maybe ...

    * convert Fahrenheit to Celsius, and C to F

    * Return the amount of time it takes to count from 1 to 1,000,000 (or any desired max integer)

    * draw a few 2D geometric shapes, with color palette examples

    This would help me (the Dummy) break through the initial New Dialect Unfamiliarity Barrier, and learn the Baby Steps I need just to make this nifty new thing fly.

    Thanks for any help!

    Bob
    Massachusetts USA

  • #2
    look at the samples that came with CC5

    Comment


    • #3
      And/Or the Source Code Forum
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Thanks Ralph and Michael, will do.

        I've been without the ability to code for almost a year, and the frustration is huge. Before my QB died, I bit off a Very Big Problem, and I'm really looking forward to wrestling with it and solving it.

        Bob

        Comment


        • #5
          a start...

          Something to dump your environment table...

          Code:
          #Compile Exe
          #Dim All
          
          Function PBMain () As Long
            Local strData As String
            Register i As Long
            
            Do
              Incr i
              strData=Environ$(i)
              Print Left$(strData,80)
            Loop While Len(strData)
            Print "Processing Complete.  Any Key To Exit...."
            Waitkey$
          
            PBMain=0
          End Function
          Fred
          "fharris"+Chr$(64)+"evenlink"+Chr$(46)+"com"

          Comment


          • #6
            Bob, this converts Far & Cel temps depending on what key you press or if mouse is moved.
            Code:
            #COMPILE EXE
            #DIM ALL
            
            FUNCTION PBMAIN () AS LONG
              LOCAL i AS STRING
            
              PRINT "Display all CHR$ codes & temperatures for keyboard and mouse events"
              PRINT "Press 'q' to Quit"
              PRINT
              PRINT "CHR     WAITKEY$ ="
            
              ' Make the caret visible. Turn mouse events ON,
              ' and set to trap all mouse events
            
              CURSOR ON
              MOUSE ON
              MOUSE 3, DOUBLE, MOVE, DOWN, UP
            
              DO
                i = WAITKEY$  ' Wait for a key or mouse event
            
                IF LEN(i) = 1 THEN
                  PRINT " "; i; "      CHR$("; ASC(i); ")";
                  IF i = "q" THEN EXIT DO
                ELSEIF LEN(i) = 2 THEN
                  PRINT "        CHR$(0,"; ASC(i, 2); ")";
                ELSEIF LEN(i) = 4 THEN
                  PRINT "Mouse   CHR$(255,255,"; ASC(i, 3); ","; ASC(i, 4); ")";
                END IF
            
                PRINT STR$(ASC(i)) & CHR$(248); "C is"; STR$(ASC(i) * 9 / 5 + 32, 3) & CHR$(248); "F ||";
                PRINT STR$(ASC(i)) & CHR$(248); "F is"; STR$((ASC(i) - 32) * 5 / 9, 3) & CHR$(248); "C"
              LOOP
            
            END FUNCTION

            Comment


            • #7
              Code:
              MACRO FtoC (F) =  (F-32 ) * 5 / 9 
              MACRO CtoF (C) =  (C*9/5) + 32
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


              • #8
                Thanks! It's flying!

                Hey thanks for the proggies! It's flying!

                B

                Comment


                • #9
                  Hey, please go to your profile setting and enter your location! We enjoy seeing where everyone is from!

                  And Hey, please use normal font sizes! No need to shout!
                  Michael Mattias
                  Tal Systems (retired)
                  Port Washington WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment


                  • #10
                    Thank you for updating location.

                    Massachusetts, huh? Hmm, Ok. I guess that explains it.
                    Michael Mattias
                    Tal Systems (retired)
                    Port Washington WI USA
                    [email protected]
                    http://www.talsystems.com

                    Comment


                    • #11
                      Shouting

                      Bob

                      Do not let Michael "Curmudgeon" remarks put you down.
                      He is by far the most helpfull member here with over 21000 posts ! It is a small price to pay for his techniques !
                      I learned a lot from his posts.
                      I wonder how he find the time to earn any money ?
                      Last edited by Guy Dombrowski; 25 Jan 2009, 07:59 PM.
                      Old QB45 Programmer

                      Comment


                      • #12
                        If I had to put a face to MM based on what I've experienced I would have to say it would be the face of Wilford Brimley.

                        (Yes I have seen his website photo, just going by actions on the website )

                        I can just hear Michael saying "It's the right thing to do" with that stern face, all the while selling you on the good stuff.

                        All meant in jest MM, there is a compliment in there, trust me
                        <b>George W. Bleck</b>
                        <img src='http://www.blecktech.com/myemail.gif'>

                        Comment


                        • #13
                          That's funny. MM looks almost exactly as I imagined him to look before I saw his photo here (the only difference was I imagined his hair as black).

                          His posts are, by far, my favorite to read. I have never taken anything he says as rude. I just imagine he has a very dead-pan, dry and sometime sarcastic sense of humor. I think some people mistake that for rudeness.

                          He's quite helpful.

                          -Michael

                          Comment

                          Working...
                          X