Announcement

Collapse
No announcement yet.

random number in PBCC

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

  • Lance Edmonds
    replied
    This posting is in the wrong forum... it will be moved in 24 hours.

    Thanks!

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

    Leave a comment:


  • Semen Matusovski
    replied
    Daniel --
    you should use Randomize before Rnd
    Code:
    #Compile Exe
    #Register None
    DefLng A-Z
    Function PbMain()
    Randomize Timer
    For i = 1 To 5
       Print Rnd
    Next
    WaitKey$
    End Function

    [This message has been edited by Semen Matusovski (edited January 16, 2000).]

    Leave a comment:


  • Guest's Avatar
    Guest started a topic random number in PBCC

    random number in PBCC

    ok, I'm in the middle of rewriting a Basic program and find that it does not use the RND in the same way as the old basic language. For the random
    number it produces is a constant 0

    is there any one that can show me a small demostration of how to create a
    random number.

    Thankyou so much
    Daniel
Working...
X