Announcement

Collapse
No announcement yet.

Mask Function TRUE/FALSE

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

  • Mask Function TRUE/FALSE

    Anyone have a nice function like this?

    a& = MASK("1234-567", "####-###")
    a& = MASK("1:20:30 AM") , "H:MM:SS AMPM")

    any ideas?

    Thanks

    ------------------
    -Greg
    -Greg
    [email protected]
    MCP,MCSA,MCSE,MCSD

  • #2
    Do you mean like this:

    Format$(FindData.nFileSizeLow\1024,"#,###")

    Or:

    Format$(xyz,"hh:mm tt")


    Format$ is built in...
    OR did I miss something here?

    Also used:
    GetTimeFormat %LOCALE_USER_DEFAULT, %TIME_NOSECONDS, st, "hh:mm tt", zText, 256

    Where st is a SYSTEMTIME structure and placed into ASCIIZ variable "zText".



    ------------------
    Scott
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

    Comment


    • #3
      Scott,

      I'm wanting something a little more advanced then the Format
      command. I want to be able to have my own MASK controls
      by using a simple function like this:

      Code:
      if MASK(sBuffer$, "###-##-####") then 
         msgbox "Social Security Number"
      end if
      
      if MASK(sBuffer$, "(###)-###-####" then
         msgbox "Phone Number"
      end if
      
      if MASK(sBuffer$, "MM-/DD-/YYYY" then
         msgbox "DATE"
      end if
      does that explain it better?

      Thanks


      ------------------
      -Greg
      -Greg
      [email protected]ingtonsignal.com
      MCP,MCSA,MCSE,MCSD

      Comment


      • #4
        You could writing something like that yourself using "regular exprssions" which are supported in PB/DLL 6

        --Dave


        ------------------
        Home of the BASIC Gurus
        www.basicguru.com
        Home of the BASIC Gurus
        www.basicguru.com

        Comment

        Working...
        X