Announcement

Collapse
No announcement yet.

How do I print NUMBERS with DDOC?

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

  • How do I print NUMBERS with DDOC?

    I have the line:

    dpText hFile%, 1.25, 1., %DDOC_CENTER,"7"

    and it prints on the page just fine. What I would like to is print the value of
    a variable, say count%:

    dpText hFile%, 1.25, 1., %DDOC_CENTER,count%

    I gather dpText prints text, but what prints numbers?

    Thanks,
    Steve

  • #2
    >I gather dpText prints text....

    You could do better than 'gather' if you read the help file shipped with ddoc P&P.

    >... but what prints numbers?

    FORMAT$(count%) might be worth looking at....
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Pleeeeese ..... I could do no better than gather since no help file included (I downloaded rather than had it shipped). I do have a set of tutorials that were downloaded. I went through them twice and could not find what I was looking for.

      I found this works:

      dpText hFile%, 1.25, 1., %DDOC_CENTER, str$(count%)

      actually prints the number I was looking for.

      Comment


      • #4
        %DDOC_CENTER, str$(count%)
        actually prints the number I was looking for.
        Actually the code using "STR$(number)" prints "leading space or minus sign" plus the decimal character representation of the number.

        FORMAT$ (number) does not add any extra leading characters.

        Probably no visual difference (when centering), but something to keep in mind (when left-justifying).
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Thanks!

          Comment

          Working...
          X