No announcement yet.

Questions About RANDOMIZE

  • Filter
  • Time
  • Show
Clear All
new posts

  • Questions About RANDOMIZE

    If I use RANDOMIZE TIMER in a UNIT, and the code in the unit
    is invoked, would the RANDOMIZE statement apply to the whole
    EXE? Or is it UNIT-specific? If it's unit-specific, would I
    have to call it every time a procedure in the unit is called,
    or would initially calling it one time in the unit make it apply
    to the whole unit for the life of the EXE?

    Thank you for any replies.


  • #2
    Actually, I guess it's pretty obvious - seeding the random number
    generator is seeding the random generator is seeding the random
    generator. In other words, once it's been seeded, it's been seeded,
    and should apply throughout the EXE, including in UNIT's.



    • #3
      After program is compiled (well, actually after the program is link-edited), there is no such thing as a "unit." any "units" have been subsumed by the target file (.exe or .pbc).

      More interesting question: what about using the RNG functions in a *.pbc (chained) file?

      No, I don't know the answer, nor do I particularly want one. It just seemed, well, 'interesting.'

      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]