Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug Reports
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...
[Image: yagl1.png]
this code is erronous.

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
Alright, all fixed, thanks mates..

Version 0.02b uploaded, will start to release just patches soon ;)
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:
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"



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)
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 ;)

Or anything longer then the console widht...

Makes it crash in windows 98
dim a as long

print len(a)

4?, same as integer...?
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.
I meant that a long is supposed to be a long integer, thus, in freebasic it would mean 8bytes, or 64bit
Is there a way to make PRINT Astring$

Work the same way as QB?, that is with wrap around etc?

Forum Jump:

Users browsing this thread: 1 Guest(s)