Announcement

Collapse
No announcement yet.

Another PB9 undocumented keyword? NUMERIC

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

  • Another PB9 undocumented keyword? NUMERIC

    Anyone have this bomb too?

    Code:
    #COMPILE EXE
    #DIM ALL
    
    FUNCTION Is_Numeric(BYVAL A$) AS LONG
        LOCAL NUMERIC AS LONG
        NUMERIC=IIF(VERIFY(A$,"01234567890")>0,0,-1)
        FUNCTION=NUMERIC
    END FUNCTION
    
    FUNCTION PBMAIN () AS LONG
            ? "IS 123 a numeric ?==>"+Str$(Is_Numeric("123")) 'Should return -1
    END FUNCTION
    Nathan Maddox

  • #2
    See LISTVIEW SORT, again. It's easy to find these keywords by using "Search" tab in the help system.
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      Originally posted by Nathan Maddox View Post
      Anyone have this bomb too?

      Code:
      #COMPILE EXE
      #DIM ALL
       
      FUNCTION Is_Numeric(BYVAL A$) AS LONG
          LOCAL NUMERIC AS LONG
          NUMERIC=IIF(VERIFY(A$,"01234567890")>0,0,-1)
          FUNCTION=NUMERIC
      END FUNCTION
       
      FUNCTION PBMAIN () AS LONG
              ? "IS 123 a numeric ?==>"+Str$(Is_Numeric("123")) 'Should return -1
      END FUNCTION

      Works as expected here, Nathan. Doesn't bomb. PBWin 8.04 XPPro sp3
      Last edited by Gösta H. Lovgren-2; 28 Aug 2008, 07:05 AM.
      It's a pretty day. I hope you enjoy it.

      Gösta

      JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
      LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

      Comment


      • #4
        > Anyone have this bomb too?

        "Bomb?"

        "BOMB?"

        Please clarify:

        1. Won't compile. Show compiler version, relevant source code lines and error message.
        2. Program compiles and runs but does not produce expected output? Post compilable code with input and output (expected and actual) along with compiler version.
        3. Program fails with General Protection Fault? Follow instructions for #2 and add Windows /OS version in service.

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

        Comment


        • #5
          NUMERIC is a reserved word in PB 9 but is not listed as such in an updated reserved word list for PB 9. I couldn't find such a list, but I suspect that one will surface as soon as the busy people find the time. As pointed out in another post it does show up in the LISTVIEW. (PB 9)

          It should compile okay in 8.04.
          Rod
          In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

          Comment


          • #6
            BTW, it's OK to use the word "bomb." Just don't use the words "infidel" and "martyr" in the same post unless you want Homeland Security all over your case.
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              Key Words

              Using PBWin 9.0 editor it shows NUMERIC as a key word.
              Using SED 1.16 editor it shows NUMERIC is not a key word.

              Are key words built into PBWin 9.0 edtor ?
              If not built in, where are they ?
              Does anyone know how to add key words to SED 1.16 ?

              Thanks
              Trento Castricone
              www.fileraptor.com
              [email protected]

              Comment


              • #8
                Thank You!

                Thanks Kevin and all for comments.
                Within PB Help | Dynamic Help | Index | Numeric didn't give a
                definitive definition of it's use, but is easy to work around.

                Thanks for all comments.
                Nathan Maddox

                Comment


                • #9
                  BTW, it's OK to use the word "bomb." Just don't use the words "infidel" and "martyr" in the same post unless you want Homeland Security all over your case.
                  Reply With Quote
                  MCM is on the list already for that post

                  That is true...and be careful if you know anyone named "Jack" you see in the airport...and yell "Hi Jack!!!"

                  (Oh noooooooo....now I am on the list too)


                  (and one thing I love about peoples reactions when I can say that my hometown has a Gun Shop at the Airport no less )

                  aka...its all good...its how you use it that could be not
                  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