Welcome, Guest. Please login or register.
August 17, 2017, 08:14:33 PM
Home Help Search Login Register
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base

Qbasicnews.com  |  General  |  General/Misc  |  Topic: Bug Reports « previous next »
Pages: [1] 2 3 ... 20 Print
Author Topic: Bug Reports  (Read 41051 times)
marzecTM
Ancient Guru
****
Posts: 688



Bug Reports
« on: December 02, 2004, 12:18:27 AM »

guess it's time for this thread...

and vonGodric just found a neat one...

try to compile the fmodtest.bas and check the asm source. on line 519-520 it tries to push ~ on the stack, dunno bout you but i don't know that register.

have fun

edit: one more

D:\FREEBA~1>fbc examples\optargs.bas
examples\optargs.o(.text+0x1d):fake: undefined reference to `FOO@12'
examples\optargs.o(.text+0x26):fake: undefined reference to `BAR@8'

uh oh..., ok it might be just a show off, but a n00b or that helium guy will complain...
Logged

quote="NecrosIhsan"]

[/quote]
VonGodric
Ancient Guru
****
Posts: 674



WWW
Bug Reports
« Reply #1 on: December 02, 2004, 02:06:58 AM »

this code is erronous.

Code:

defint a-z
option explicit
type struct
   Xpos as integer
   ypos as integer
   x1pos as integer
   y1pos as integer
   Name  as string * 15
   Cmdd as sub()        'doesn't seem to allow passing amty parameter list
end type
Logged

url]http://fbide.sourceforge.net/[/url]
v3cz0r
I hold this place together
*****
Posts: 924



WWW
Bug Reports
« Reply #2 on: December 02, 2004, 02:41:20 AM »

Alright, all fixed, thanks mates..


Version 0.02b uploaded, will start to release just patches soon ;)
Logged

SJ Zero
Been there, done that
*****
Posts: 1211



WWW
Bug Reports
« Reply #3 on: December 02, 2004, 03:32:25 AM »

The right$ function isn't supposed to reverse the string. It's just supposed to return the characters starting X from the right, to the end.

The current code doesn't run correctly in FB:
Code:

a$ = "Hell is a place on earth"
a$ = LEFT$(a$, 3)
a$ = a$ + LCASE$(LEFT$("Low man's Lyric is a favourite song of mine.", 2))
b$ = "Now we see the truth."
a$ = a$ + " " + UCASE$(MID$(b$, 3, 1)) + MID$(b$, 2, 1)
b$ = "Girls are yucky"
a$ = a$ + LCASE$(LEFT$(RIGHT$(b$, LEN(b$) - INSTR(b$, "i")), INSTR(b$, "r") - 1)) + "d"

PRINT a$


SLEEP


I'll be checking more of the text functions sooner or later. For now I need to sleep. (edited because instr works, so I updated the program to show that)
Logged
v3cz0r
I hold this place together
*****
Posts: 924



WWW
Bug Reports
« Reply #4 on: December 02, 2004, 04:11:44 AM »

Fixed.. man, that was a stupid bug, i never used right$ for anything but getting the last character, no wonder it worked.


Btw, runtime library was barelly tested, new surprises can appear.. that why i released a beta version ;)
Logged

Z!re
*/-\*
*****
Posts: 4599



Bug Reports
« Reply #5 on: December 02, 2004, 06:01:57 AM »

PRINT SPACE$(100)

Or anything longer then the console widht...

Makes it crash in windows 98
Logged
Z!re
*/-\*
*****
Posts: 4599



Bug Reports
« Reply #6 on: December 02, 2004, 06:13:58 AM »

Code:
dim a as long

print len(a)


4?, same as integer...?
Logged
v3cz0r
I hold this place together
*****
Posts: 924



WWW
Bug Reports
« Reply #7 on: December 02, 2004, 09:21:39 AM »

No clue, that space$(100) test works fine on XP, i can't believe Win 9x can't print more than 80 chars p/ time, didn't see that limitation at the SDK docs, ow.


Yeah, an integer is 32-bit in FB, LONG is just an alias. If you really want a 16-bit integer, you have to declare them as "short" or "ushort" for unsigned ints. Using 16-bit integers would generate pretty bad code on new CPU's, size prefixes all the time.
Logged

Z!re
*/-\*
*****
Posts: 4599



Bug Reports
« Reply #8 on: December 02, 2004, 12:32:31 PM »

I meant that a long is supposed to be a long integer, thus, in freebasic it would mean 8bytes, or 64bit
Logged
Z!re
*/-\*
*****
Posts: 4599



Bug Reports
« Reply #9 on: December 02, 2004, 12:36:06 PM »

Is there a way to make PRINT Astring$

Work the same way as QB?, that is with wrap around etc?
Logged
v3cz0r
I hold this place together
*****
Posts: 924



WWW
Bug Reports
« Reply #10 on: December 02, 2004, 01:05:09 PM »

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.
Logged

Z!re
*/-\*
*****
Posts: 4599



Bug Reports
« Reply #11 on: December 02, 2004, 01:05:57 PM »

Code:
do
loop while inkey$ = ""
end


Freezes, on win98 and XP


FBC commandline: fbc test.bas -s gui
Logged
v3cz0r
I hold this place together
*****
Posts: 924



WWW
Bug Reports
« Reply #12 on: December 02, 2004, 01:09:41 PM »

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.
Logged

Z!re
*/-\*
*****
Posts: 4599



Bug Reports
« Reply #13 on: December 02, 2004, 01:13:21 PM »

:oops: hehe...
Logged
Jofers
Been there, done that
*****
Posts: 1040



WWW
Bug Reports
« Reply #14 on: December 02, 2004, 01:15:29 PM »

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.
Logged
Pages: [1] 2 3 ... 20 Print 
Qbasicnews.com  |  General  |  General/Misc  |  Topic: Bug Reports « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
SMF Theme © Gaia
Valid XHTML 1.0! Valid CSS!