none
How to make a one instance program in Small basic RRS feed

  • Question

  • I have been working on this code for months and still have not found a solution kind of annoying.

    BB = "Binary"
    BB2 = "hidden"
    While (BB = "Binary")
      While (BB2 = "hidden")
        TextWindow.Hide()
      EndWhile
      Binary = 2
      Binary2 = 4
      Binary3 = 6
      Binary4 = 8
      
      Binary5 = 4
      Binary6 = 2
      Binary7 = 8
      Binary8 = 6
      
      Binary9 = 6
      Binary10 = 2
      Binary11 = 8
      Binary12 = 4
      
      Binary13 = 8
      Binary14 = 6
      Binary15 = 4
      Binary16 = 2
      
      
      TextWindow.ForegroundColor = "Blue"
      TextWindow.Write(Binary)
      TextWindow.Write(Binary2)
      TextWindow.Write(Binary3)
      TextWindow.Write(Binary4)
      TextWindow.Write(Binary5)
      TextWindow.Write(Binary6)
      TextWindow.Write(Binary7)
      TextWindow.Write(Binary8)
      TextWindow.Write(Binary9)
      TextWindow.Write(Binary10)
      TextWindow.Write(Binary11)
      TextWindow.Write(Binary12)
      TextWindow.Write(Binary13)
      TextWindow.Write(Binary14)
      TextWindow.Write(Binary15)
      TextWindow.Write(Binary16)
    EndWhile

    is there any way to make it only run one instance of the program?

    without using some other programming language.

    Thursday, November 17, 2016 6:45 AM

Answers

  • Try this code: only display your binary numbers by group of 4

    __________________________________________________________________________
      Binary = 2
      Binary2 = 4
      Binary3 = 6
      Binary4 = 8
     
      Binary5 = 4
      Binary6 = 2
      Binary7 = 8
      Binary8 = 6
     
      Binary9 = 6
      Binary10 = 2
      Binary11 = 8
      Binary12 = 4
     
      Binary13 = 8
      Binary14 = 6
      Binary15 = 4
      Binary16 = 2
     
     
      TextWindow.ForegroundColor = "white"
      TextWindow.Write(Binary)
      TextWindow.Write(Binary2)
      TextWindow.Write(Binary3)
      TextWindow.Write(Binary4)
      TextWindow.writeline("")
      TextWindow.Write(Binary5)
      TextWindow.Write(Binary6)
      TextWindow.Write(Binary7)
      TextWindow.Write(Binary8)
      TextWindow.writeline("")
      TextWindow.Write(Binary9)
      TextWindow.Write(Binary10)
      TextWindow.Write(Binary11)
      TextWindow.Write(Binary12)
      TextWindow.writeline("")
      TextWindow.Write(Binary13)
      TextWindow.Write(Binary14)
      TextWindow.Write(Binary15)
      TextWindow.Write(Binary16)
      TextWindow.writeline("")

    ____________________________________________________________________________________

    Thursday, November 17, 2016 1:48 PM
    Answerer

All replies

  • What do you mean by "run only once"? Your program continous repeats the "While BB="hidden" loop and does not go any further. What do you want the program to do?

    Jan [ WhTurner ] The Netherlands

    Thursday, November 17, 2016 9:28 AM
    Answerer
  • Try this code: only display your binary numbers by group of 4

    __________________________________________________________________________
      Binary = 2
      Binary2 = 4
      Binary3 = 6
      Binary4 = 8
     
      Binary5 = 4
      Binary6 = 2
      Binary7 = 8
      Binary8 = 6
     
      Binary9 = 6
      Binary10 = 2
      Binary11 = 8
      Binary12 = 4
     
      Binary13 = 8
      Binary14 = 6
      Binary15 = 4
      Binary16 = 2
     
     
      TextWindow.ForegroundColor = "white"
      TextWindow.Write(Binary)
      TextWindow.Write(Binary2)
      TextWindow.Write(Binary3)
      TextWindow.Write(Binary4)
      TextWindow.writeline("")
      TextWindow.Write(Binary5)
      TextWindow.Write(Binary6)
      TextWindow.Write(Binary7)
      TextWindow.Write(Binary8)
      TextWindow.writeline("")
      TextWindow.Write(Binary9)
      TextWindow.Write(Binary10)
      TextWindow.Write(Binary11)
      TextWindow.Write(Binary12)
      TextWindow.writeline("")
      TextWindow.Write(Binary13)
      TextWindow.Write(Binary14)
      TextWindow.Write(Binary15)
      TextWindow.Write(Binary16)
      TextWindow.writeline("")

    ____________________________________________________________________________________

    Thursday, November 17, 2016 1:48 PM
    Answerer