Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug Reports
#11
No, they are not, 64-bit numbers would need a math lib for themselves, operations would be so slow as they are in QB when working with 32-bit ones.

I thought the text wrap around was okay, i never paid attention to it anyway.. maybe another win 9x quirk.
Reply
#12
Code:
do
loop while inkey$ = ""
end

Freezes, on win98 and XP


FBC commandline: fbc test.bas -s gui
Reply
#13
Er, you can't create a gui app and check for console input, it won't work.

Gui apps must set up their own WinProc's and process any keyboard input, check that WinHello example.
Reply
#14
:oops: hehe...
Reply
#15
64-bit integer operations are available on 64-bit chips, and on a 64-bit cpu "long" is 64 bits. But for 32-bit cpus, it's universally an alias for int.

And yes, event-based programming, while not the devil, demonstrates many devilish qualities. I just had to finish a videogame in java for an assignment. Must annoying, tiring programming there is.
Reply
#16
When I moved from QB to VB, I found that making a game based on events is a hella challenge when coming from a procedural environment. But now coming back to a procedural environment is like "oh yeah, this stuff rules". Big Grin Anyways...I have some headers that I'm going to write later today for this thing, I hope they'll serve someone well and that they turn out bug-free. Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#17
All this should be listed on FAQ's or such, it is and will be a common mistake - PowerBasic doesn't even have an inkey$, iir, no wonder.
Reply
#18
something small. when doing for loops, you can't have:

next y,x

it won't allow it.
Jumping Jahoolipers!
Reply
#19
heh. I never knew you could do that with qb.

It doesn't seem necessary.. have lots of fors and one next is confusing and obsfucated.
Reply
#20
i guess. but it's nice for limited line compo's. Smile

Also found something else when trying to compile a menu program i got from qbnz:

Code:
DECLARE SUB menu (numberofchoices, title$, menuchoices$(), choice)

CLS

title$ = "title"

numofchoices = 3 'number of choices in your menu (1 to numofchoices)

DIM menuchoices(numofchoices) AS STRING
'your menu choices as text:

menuchoices(1) = "first choice"
menuchoices(2) = "choice..."
menuchoices(3) = "exit"

CALL menu(numbofchoices, title$, menuchoices$(), choice)
ERASE menuchoices 'makes the array inexistant

'  choice   is the selection now you can use : select case or other code

SELECT CASE choice
CASE 1
PRINT "1.first choice"
CASE 2
PRINT "2..."
CASE 3
PRINT "bye"
END SELECT

SUB menu (numofchoices, title$, menuchoices$(), choice)
CLS
choice = 1          'initialize the choice

'menu format:
distancefromtoptomenu = INT((27 - numofchoices) / 3)


'menu title

LOCATE 2, (41 - LEN(title$) / 2): PRINT title$


DO

RESTORE                    '38 - LEN(MENUCHOICES(numofchoices)) / 2

FOR n = 1 TO numofchoices
LOCATE n + distancefromtoptomenu, 34: PRINT n; ") "; menuchoices$(n)
IF n = choice THEN LOCATE n + distancefromtoptomenu, 33: PRINT ">"
IF n = pchoice AND pchoice <> choice THEN LOCATE n + distancefromtoptomenu, 33: PRINT " "


NEXT

    k$ = ""

   DO
        
    k$ = INKEY$
    vakey = VAL(k$)
    k$ = UCASE$(k$)
  

   LOOP UNTIL k$ <> ""

     pchoice = choice ' save the past choice

    IF k$ = (CHR$(0) + "P") AND numofchoices >= choice THEN choice = choice + 1
    IF k$ = (CHR$(0) + "H") AND 1 <= choice THEN choice = choice - 1
    IF k$ = (CHR$(0) + "P") AND numofchoices < choice THEN choice = 1
    IF k$ = (CHR$(0) + "H") AND 1 > choice THEN choice = numofchoices

    IF VAL(k$) = vakey AND vakey <= numofchoices AND vakey >= 1 THEN pchoice = choice: choice = VAL(k$)
    IF k$ = CHR$(13) THEN EXIT DO
    IF k$ = CHR$(27) THEN choice = 0: k$ = "": EXIT DO
  
LOOP

END SUB

I got this error:

free.bas(9) : error 11: Expected constant, found: ')'

to me the syntax looks legal.
Jumping Jahoolipers!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)