Announcement

Collapse
No announcement yet.

Displaying Leading Zeroes

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

  • Displaying Leading Zeroes

    I'd like to display a two (numeric) digit field with a leading zero. Using the following code

    Code:
    a$ = USING$("##  :  ", ix)
    I get a leading space. I tried a couple of things including a *x in the format string without success.

    I know this is going to be embarassing but how do I display leading zeroes???

    Tnx in advance.

    Tom

  • #2
    REPLACE chr$(32) with chr$(48) in a$
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

    Comment


    • #3
      Tom,
      look at the FORMAT$ function. It allows you to explicitly set leading zeroes.

      Paul.

      Comment


      • #4
        Thanks to you both. I'll figure this (kinda sorta) new dialect out one of these days ... .

        Appreciate it!

        Tom

        Comment

        Working...
        X