Announcement

Collapse
No announcement yet.

A NEWBIE QUESTION NEED ASAP!!

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

  • #21
    Thanks, Don & Ian! Ian might be on the right track, that maybe
    Brian has an older version of the compiler. One thing that casts
    doubts on that theory, though, is that he's a "newbie", so he probably
    just recently purchased the compiler, which'd mean he'd have version
    3.5. I think the problem is typoes, especially with all those "()".

    Tom,

    Thanks! That's BEAUTIFUL! That's the kind of "tricks & tips for
    programming" that I *love* learning about! That'll pave the way
    for me to figure out more "elegant" code in other kinds of
    statements.

    Regards,


    ------------------
    Clay C. Clear

    mailto:[email protected][email protected]</A>

    Clay Clear's Software

    Comment


    • #22
      Clay, He might be using FirstBasic. However, error 420 comes up if a function is not defined or if it is not a PowerBasic function.

      regards,

      ------------------
      [email protected]
      :) IRC :)

      Comment


      • #23
        Ian,

        Never thought about FirstBasic.

        However, in his text description (not the error number) of the
        error, what he described is the compiler error for when the
        compiler finds a string operand where a numeric one should be. However,
        if he IS using FirstBasic, then I have no clue as to the error
        codes it generates. Never messed with it.

        Regards,

        Just a sec, before posting any arguments to this posting - I've
        been up for about 48 hours straight, and my memory may very well
        be faulty at this point. So, I'm going to go wade through the
        earlier postings in this thread, to see if I recall his error
        description correctly.

        ------------------
        Clay C. Clear

        mailto:[email protected][email protected]</A>

        Clay Clear's Software

        [This message has been edited by Clay Clear (edited September 07, 2001).]

        Comment


        • #24
          This code will work:

          DIM FF AS LONG
          FF = FREEFILE
          OPEN "c:\windows\desktop\myfile.txt" FOR OUTPUT AS #FF
          FOR L& = 0 TO 9999
          TempString$=USING$("####",L&)
          REPLACE ANY " " WITH "0" IN TempString$
          PRINT #FF, TempString$
          Next
          CLOSE #FF


          ------------------

          Comment


          • #25
            Well guys I just got back! Well I really appreciate everyone's time
            and effort helping me. Just for your info I am just using the
            power basic 3.20 version. I just tried Lee's code and it works
            perfectly. I really appreciate everyone's help. I would of never
            expected this much response. THANK YOU guys. Hopefully I'll be back
            again sometime. It always amazes me how knowledgable you guys are!
            Thanks Again!

            ------------------

            Comment


            • #26
              Brian, the compiler version was the crucial missing piece of information. Had you noted that in your very first post, the response would not have been so great because the TRIM$() issue could have bee identified immediately!

              That is, TRIM$() was introduced in PB3.5, not PB3.2.

              Anyway, glad to see you got there in the end.


              ------------------
              Lance
              PowerBASIC Support
              mailto:[email protected][email protected]</A>
              Lance
              mailto:[email protected]

              Comment


              • #27
                FUNCTION Trim$(inText$)
                FUNCTION = ltrim$(rtrim$(inText$))
                END FUNCTION

                I actually started working on a compatibility INCLUDE file
                so I could compile my PB35 PBCgiLib in PB3.2 and QB7.1.

                It was included with PBCgiLib on my website. http://projects.dosos.com/



                ------------------
                Amos

                Comment

                Working...
                X