Quantcast
Channel: random
Browsing all 12 articles
Browse latest View live

random

oh, thanks! i didnt know about 'and' in if-thenthats the soilution can i also use 'or' the same way?Yes we can use "Or" in If....Elsee.gIf Var1 = 1 Or Var2 = 5 Then 'Do something if one of two...

View Article



random

oh, thanks! i didnt know about 'and' in if-thenthats the soilution can i also use 'or' the same way?

View Article

random

Hi ming7,All variables in Small Basic are global variable, you an use them anywhere withing your program.Merry Xmas!

View Article

random

Use an if statelemetIf (var >= 1 And var <=50) Then 'Do somethign if var is between 1 and 50 inclusive EndIf

View Article

random

sorry for lame question, i looked through the forum but didnt find something close enoughhow to check if variable belong to interval? 

View Article


random

This right, except the last line that should be (note the 2nd argument is a 2:File.WriteLine("C:\SB\variables.txt", 2, var2)The file is created if it doesn't exist.

View Article

random

and last question, not related to the randomif i want to keep some of variables in file : //in the beginning of a programvar1 = File.ReadLine("C:\SB\variables.txt",1)var2 =...

View Article

random

Your code generates 1 random number between 0 and 99.For i = 1 To 1 ' This just creates one number so probably unnecessaryMath.GetRandomNumber(100) ' This gets a random number between 1 and 100...

View Article


random

Yes, that is a way to do it, but the "For i = 1 To 1" and the "EndFor" are not necessary for it to work. Another thing to note is that if you want a random number from 1 to 100 you wouldn't need the -1...

View Article


random

1. then if i want to get random number from 1 to 100 i type For i = 1 To 1  rand = (Math.GetRandomNumber(100) - 1) EndFor2. so it is possible to make ''random'' number generator based on pc clock, isnt...

View Article

random

There is the method GetRandomNumber which returns a random integer value between 1 and the input argument.  Note that if for example you want a random number between -10 and 10 with possible values in...

View Article

random

is it possible to generate random number in SB?or could you please explain to me how to get time from pc clock?thank you

View Article
Browsing all 12 articles
Browse latest View live




Latest Images