Search found 8 matches

by Wyndo
Tue Aug 09, 2005 7:10 am
Forum: General Discussion
Topic: strange error
Replies: 11
Views: 14649

Is your program already really large, or are you making some assembly calls? If no to both, it might not be that. Try saving your program as "plain text", then open it in notepad and make sure that when you change your SUB to a FUNCTION that QB didn't accidentally make a duplicate in the s...
by Wyndo
Tue Aug 09, 2005 7:08 am
Forum: General Discussion
Topic: some c code
Replies: 45
Views: 63510

Something may be missing. Have you coded "mktime" into QB? The call to it still looks like C code. Also, those BCD2BIN calls will have to be changed to value=BCD2BIN(value) in order to work right. As for passing a variable by reference instead of by value, I don't remember how to do this w...
by Wyndo
Mon Aug 08, 2005 4:12 pm
Forum: General Discussion
Topic: some c code
Replies: 45
Views: 63510

Woops. I forgot about that. I did test BitLeft and BitRight, but I was just winging it on BCD_TO_BIN. Sorry about that. I haven't used QB much in several years. Also, for your example, you only need BitRight. It doesn't look like BitLeft is used, unless you need it for something else later.
by Wyndo
Mon Aug 08, 2005 4:03 pm
Forum: General Discussion
Topic: some c code
Replies: 45
Views: 63510

I made a change to BCD_TO_BIN when I remembered "val" is a reserved word in QB. Try the edited version directly above your prior message, and that *should* do the same thing as your C Macro. Compare the results to know for sure.
by Wyndo
Mon Aug 08, 2005 3:57 pm
Forum: General Discussion
Topic: some c code
Replies: 45
Views: 63510

To write your function, it would look like this. *Hopefully* this is right. Try it and see. 'Based on: '#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10) FUNCTION BCD_TO_BIN(value!) BCD_TO_BIN = (value! AND 15) + (BitRight(value!,4)*10) END FUNCTION The only other difference is that the...
by Wyndo
Mon Aug 08, 2005 3:52 pm
Forum: General Discussion
Topic: some c code
Replies: 45
Views: 63510

There has to be a quicker, less clunky way of doing it, but I wrote a bit of code below that does the trick. It works for 32 bits shifting left (the leftmost bit is lost), and 31 bits shifting right (the rightmost bit is lost, and the leftmost bit is ignored due to the way I'm handling it). It might...
by Wyndo
Mon Aug 08, 2005 3:04 pm
Forum: General Discussion
Topic: A 1-Ranker?
Replies: 2
Views: 6078

Oh. And by the way -- hi all.
by Wyndo
Mon Aug 08, 2005 3:00 pm
Forum: General Discussion
Topic: A 1-Ranker?
Replies: 2
Views: 6078

A 1-Ranker?

Does this site have some guy that just goes ranking every submission (perhaps other than his own) a 1? I uploaded Lunatix yesterday or the day before -- granted, not the greatest game ever made, but certainly not the worst. I don't even have to feign humility to suggest it's at *least* better than t...