Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FreeBASIC wishlist...
#1
Dynamic arrays inside UDTs:
Code:
Type MyType
Arr(0) As Integer
End Type
Dim Blah(10) As MyType
reDim Blah(0).Arr(10)
reDim Blah(1).Arr(40)
reDim Blah(2).Arr(100)


Setting variable values on declare:
Code:
Dim a As Integer = 100
Reply
#2
The second one will be in 0.11b, v1c has said he won't release 0.11b without it. I dunno about the first one.
I'd knock on wood, but my desk is particle board.
Reply
#3
1st one I don't think it'be implemented, couse that's not what UDT's are, but you can use pointers instead.
url]http://fbide.sourceforge.net/[/url]
Reply
#4
Freebasic is nearly perfect, but I could see creating a compatibility lib which would emulate ModeX and VESA modes. If anyone other than myself is interested in such a thing, where you'd just have to replace POKE, CALL INTERRUPT and OUT statements with compatPOKE, CALL compatINTERRUPT and compatOUT, I might be willing to write it.
Reply
#5
Quote:1st one I don't think it'be implemented, couse that's not what UDT's are, but you can use pointers instead.

It would still be nice to have, VB has it, or so I have been told.
Reply
#6
SJ Zero: new gfxlib in CVS already emulates all QB modes, plus adds new modes from 320x240 (like ModeX) up to 1024x768 and hi/truecolor. POKE to video memory is possible too, even though you first have to get a pointer to the (virtual) framebuffer via new function SCREENPTR:
Code:
DIM video AS BYTE PTR
SCREEN 14 ' 320x240
video = SCREENPTR
SCREENLOCK
' Let's write a white pixel in top-left corner of screen
POKE video, 15
SCREENUNLOCK
SLEEP
OUT, INP and WAIT emulation for palette and vsync management is there too.
ngelo Mottola - EC++
Reply
#7
Just three words:

I
CAN'T
WAIT

Wink
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#8
Dynamic arrays in UDTs sounds like it would take away from the structured nature of TYPES. I mean, maybe you could have automated pointers to dynamic arrays, but I thought that TYPEs were optimized such that all entries are the same length, and padded to a power of 2 for fast lookup.
Reply
#9
coolness!!!
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#10
I think FB handles arrays as pointers anyway, so the array in a udt would be a 4 byte pointer in memory. Actuall manipulation of the udt data to an external source would just require it to reference that pointer.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)