Search found 6 matches

by mrRothchildsjr
Fri Apr 17, 2015 12:22 pm
Forum: Other topics
Topic: rnd question
Replies: 3
Views: 1693

Re: rnd question

thanks..do I need a + 1 to loosen the upper bound, i.e. 9999 vs 10000
by mrRothchildsjr
Fri Apr 17, 2015 11:40 am
Forum: Other topics
Topic: rnd question
Replies: 3
Views: 1693

rnd question

hi, i have a code snippet..

0 d1 = int(RND(1) * 10000 + 1)

this should produce a random number between 1 and 10,000.. how would I augment the snippet to produce a number between 1,000 and 10,000 i.e. a floor..-Eliott
by mrRothchildsjr
Sun Nov 09, 2014 1:59 pm
Forum: Other topics
Topic: debug issue
Replies: 1
Views: 1124

debug issue

'b' one = 0 0 one = one + 1 print one pause(.1) if one = 1000000 then goto 7 goto 0 '--- 1 print "done" 'written by princess Rothchilds........ -- - an 'embedded' iterative-like environment........ one2 = 0 2 one2 = one2 + 1 print one2 pause(.1) if one2 = 1000000 then goto 3 goto 2 '--- 3 print "don...
by mrRothchildsjr
Wed Nov 05, 2014 7:43 pm
Forum: Other topics
Topic: rnd() question
Replies: 5
Views: 2647

Re: rnd() question

Btw, the app is spectacular..Ty for making a great iOS programming language accessible..
by mrRothchildsjr
Wed Nov 05, 2014 7:41 pm
Forum: Other topics
Topic: rnd() question
Replies: 5
Views: 2647

Re: rnd() question

Thank you
by mrRothchildsjr
Wed Nov 05, 2014 6:26 pm
Forum: Other topics
Topic: rnd() question
Replies: 5
Views: 2647

rnd() question

Example:

varsleep = 0

10 d1 = int(RND * 6 + 1)

print d1

11 varsleep = varsleep + 1

pause(.1)

if varsleep = 10 then goto 13

12 goto 10

13 print "done!"


Hi! Why do I get ten 1s instead of pseudo-random dice rolls each time I execute?