Search found 394 matches
- Tue Mar 04, 2008 10:51 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Cannot post code!
- Replies: 4
- Views: 14133
- Thu Feb 21, 2008 6:15 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: sizeof()
- Replies: 12
- Views: 26612
LEN() also shows the number of bytes needed by the variable.
Code: Select all
LEN(Int%) = 2
LEN(Lng&) = 4
LEN(Sgl!) = 4
LEN(Dbl#) = 8
LEN(Strng$) = Number of characters in the variable, each weighing in at 1 byte each.
- Thu Feb 07, 2008 5:43 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: binair to bits
- Replies: 20
- Views: 56780
Not entirely related, but... http://www.petesqbsite.com/forum/viewtopic.php?t=1830 Also, a more simple but less universal (than the one in the other post I linked to) code to determine the bits of a number... 'Inputs: YourNum% - The number to turn into binary. 'Outputs: Bin$ - The number in binary, ...
- Tue Feb 05, 2008 11:56 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: binair to bits
- Replies: 20
- Views: 56780
If you're only dealing with 4 bits, then a simple should give you what you're looking for. That's saying if you pull out the 4 bits you needed into the YourValue%, that is.
Code: Select all
YourValue% XOR 16
- Mon Feb 04, 2008 9:40 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: binair to bits
- Replies: 20
- Views: 56780
Burger's way pretty much shows it in a nutshell. Pretty much, once you have the variable loaded, you can use one of the bitwise -operators to manipulate it. Here's another example. Say that Bit 0 controls whether a certain action is done or not. You can toggle it many different ways. OurValue% = 1 '...
- Sun Jan 27, 2008 10:24 am
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Fastest way to get Keyboard presses
- Replies: 21
- Views: 77782
- Sat Jan 26, 2008 9:55 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Fastest way to get Keyboard presses
- Replies: 21
- Views: 77782
I made this a long time ago... Hopefully you can get it to work without too much work. I've commented it so you can see exactly what's going on and exactly how to use it... Basic knowledge of LOCATE a major plus.
http://pastebin.ca/874102
http://pastebin.ca/874102
- Thu Jan 24, 2008 9:31 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Fastest way to get Keyboard presses
- Replies: 21
- Views: 77782
- Thu Jan 24, 2008 7:52 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Fastest way to get Keyboard presses
- Replies: 21
- Views: 77782
Though not entirely better, you could do:
Code: Select all
CLS
DO
DO
k$ = INKEY$
LOOP UNTIL K$ <> ""
SELECT CASE k$
CASE "q"
PLAY "mbE"
CASE "w"
PLAY "mbF"
CASE "e"
PLAY "mbB"
END SELECT
LOOP
- Thu Jan 17, 2008 4:51 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Im A newb.
- Replies: 8
- Views: 23660
Well, first off, welcome to the QuickBASIC community! If you ever have anything to ask, we're usually pretty friendly here and get things sorted out. As for your question, I don't understand exactly what you mean, but doing string1$ + string2$ makes the text of string2$ be appended to the end of str...
- Wed Jan 16, 2008 8:00 pm
- Forum: General Discussion
- Topic: What programming languages have a bit as variable type?
- Replies: 9
- Views: 23425
- Wed Jan 16, 2008 7:56 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Um, credit card genorator problem...
- Replies: 23
- Views: 64960
- Sun Jan 13, 2008 11:32 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Um, credit card genorator problem...
- Replies: 23
- Views: 64960
- Sat Jan 12, 2008 6:06 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Um, credit card genorator problem...
- Replies: 23
- Views: 64960
Re: How it works
Interesting way to check the numbers over 10 when multipied by 2: LuhnCheck% = LuhnCheck% + 9 * (LuhnCheck% >= 10) Subtracting the 9 wasn't my idea, but using the logical operator in there was. Coming from TI-BASIC makes you see tons of small optimizations you can do to the program. Also, to tweak ...
- Sat Jan 12, 2008 2:36 am
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Um, credit card genorator problem...
- Replies: 23
- Views: 64960
I've checked this against some sites on the internet, all validating my code against the Luhn method, so this code does what you need it to do. However, you might want to tweak it to make sure that you're not going out of industry boundaries. More info here: http://www.merriampark.com/anatomycc.htm ...
- Tue Oct 02, 2007 10:41 pm
- Forum: General Discussion
- Topic: I need to get a hold of...
- Replies: 2
- Views: 13467
- Mon Oct 01, 2007 1:02 pm
- Forum: General Discussion
- Topic: I need to get a hold of...
- Replies: 2
- Views: 13467
I need to get a hold of...
Plasma.
Has anyone seen him lately? Is he usually on IRC or some instant messneger?
Thanks for the help.
Has anyone seen him lately? Is he usually on IRC or some instant messneger?
Thanks for the help.
- Tue Sep 25, 2007 8:00 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Help with searching for words (for a data base)
- Replies: 20
- Views: 61985
- Mon Sep 24, 2007 3:37 pm
- Forum: General Discussion
- Topic: is Qb dead?
- Replies: 21
- Views: 69110
-lang qb is something I dont know. What is it? It's a compile time option for FreeBASIC to make it so your program that was in QB has a much better chance of compiling, but you also have most (if not all) the old restrictions that QB had. In my opinion, this is one of the best things I have seen fo...
- Sun Sep 23, 2007 7:28 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Help with searching for words (for a data base)
- Replies: 20
- Views: 61985