Username:    Password:      Remember me       
Great White Games/Pinnacle Entertainment Group Forum Index Great White Games/Pinnacle Entertainment Group
Discussion Forum for PEG/GWG
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Anyone use Qbasic?

 
Post new topic   Reply to topic    Great White Games/Pinnacle Entertainment Group Forum Index -> The Break Room
View previous topic :: View next topic  
Author Message
Snate56
Legendary


Joined: 11 Jun 2006
Posts: 4275
Location: Monroe, Washington

PostPosted: Fri Sep 12, 2014 7:10 pm    Post subject: Anyone use Qbasic? Reply with quote

I'm looking for something simple to pull a random item off a list and print it, so I chose Qbasic. (Trying to set up the Thrilling Tales Adventure Generator)

I suppose you guys that make all those table generators out there use far more sophisticated programs but all I need is something simple, I haven't touched Basic in a long, long time! Laughing



SteveN
_________________
"We've got a blind date with destiny... and it looks like she's ordered the lobster." <The Shoveller>
Back to top
View user's profile Send private message
Rohan
Veteran


Joined: 21 Aug 2008
Posts: 852
Location: Silver Gryphon Head Quarters

PostPosted: Fri Sep 12, 2014 7:38 pm    Post subject: Reply with quote

Holy crap.

I haven't seen a question about Qbasic since Mom and Dad upgraded their machine to MS DOS 6.0!

Qbasic would work fine, Fortran would be another good choice since it's a simple language with great input/output and indexing features for looking up information in lists or matrices. It's also remarkably similar to Texas Instrument's programming language, so if you can program a TI-81 - 89, you're in good hands with Fortran.

Use what you will, good sir!
_________________
Kevin Rohan, Content Director
www.silvergryphongames.com

Become a fan on Facebook: www.facebook.com/Silvergryphongames

Current WIP: Wellstone City Chronicles, Puppets, and One-liners
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Snate56
Legendary


Joined: 11 Jun 2006
Posts: 4275
Location: Monroe, Washington

PostPosted: Fri Sep 12, 2014 9:54 pm    Post subject: Reply with quote

Ha!
Yeah, Rohan, that was about the last time I used it, too! Very Happy

And I think I screwed up, I meant Just BASIC, a littler version of Liberty BASIC, designed to work with Windows 7 & 8.

But I downloaded it, got it to work, and now need to randomize dice.

Rnd(1) brings back a random number between 0 & 1, so I put Int(Rnd(1)*100)+1, which gives me a random whole number between 1 & 100.
Now I could divide that by 5 to get a d20, but I didn't want to divide by 17 to get a d6 if there was a simpler way that I'm just not seeing...




SteveN
_________________
"We've got a blind date with destiny... and it looks like she's ordered the lobster." <The Shoveller>
Back to top
View user's profile Send private message
The One
Heroic


Joined: 14 May 2003
Posts: 1307

PostPosted: Sat Sep 13, 2014 1:58 am    Post subject: Reply with quote

I'm massivly rusty on my BASIC and primarily used visual BASIC at that but the following should work

Code:

Dim x As Integer = 6
Dim value As Integer = CInt(Int((x * Rnd()) + 1))



This would generate a random number between 1 and 6, if I wanted another dice range then I'd need change the value of x
_________________
Life: Past trends are not an indication of future performance
Back to top
View user's profile Send private message Yahoo Messenger
Snate56
Legendary


Joined: 11 Jun 2006
Posts: 4275
Location: Monroe, Washington

PostPosted: Sat Sep 13, 2014 5:47 am    Post subject: Reply with quote

Thanks! I'll try it out.



SteveN
_________________
"We've got a blind date with destiny... and it looks like she's ordered the lobster." <The Shoveller>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Great White Games/Pinnacle Entertainment Group Forum Index -> The Break Room All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum