Search found 21 matches
- Mar 07, 2023 10:53
- Forum: Sources, Examples, Tips and Tricks
- Topic: Binary Search Tree and AVL tree
- Replies: 14
- Views: 5141
Re: Binary Search Tree and AVL tree
I played with the code a bit and got it to work with the latest FB version, I don't claim to understand the code or that it's kosher instead of hunting for errors in the original code, I decided to rewrite it from scratch: #define maxitem 1000 type Node key as integer left as ulong right as ulong h...
- Mar 07, 2023 10:41
- Forum: Sources, Examples, Tips and Tricks
- Topic: Binary Search Tree and AVL tree
- Replies: 14
- Views: 5141
Re: Binary Search Tree and AVL tree
With which version of fbc can you compile this code ? Sorry, fxm. I didn't see your reply... :( I compiled with no errors with FreeBASIC Version 1.09.0, win-64 My question was about the two codes in the first post ! For example for the first code, I get: Command executed: "C:\.....\FBIde0.4.6r...
- Mar 01, 2023 13:00
- Forum: Sources, Examples, Tips and Tricks
- Topic: Binary Search Tree and AVL tree
- Replies: 14
- Views: 5141
- Jan 20, 2023 11:27
- Forum: General
- Topic: sizeof(udt) and more
- Replies: 3
- Views: 389
Re: sizeof(udt) and more
Oh, God! I'll have to rewrite 80% of my code...
Well, at least I learned something.
Thanks, fxm!
Well, at least I learned something.
Thanks, fxm!
- Jan 20, 2023 10:31
- Forum: General
- Topic: sizeof(udt) and more
- Replies: 3
- Views: 389
sizeof(udt) and more
Hi guys, please help me out because this thing is driving me crazy. Have a look at this code fragment: type flddef field = 1 name as string * 16 namelen as ubyte type as ubyte size as ushort end type print sizeof(flddef) I should get 20 (16 + 1 + 1 + 2) but the result is 21. Why? But there's more: I...
- Dec 16, 2022 19:29
- Forum: Sources, Examples, Tips and Tricks
- Topic: Binary Search Tree and AVL tree
- Replies: 14
- Views: 5141
Re: Binary Search Tree and AVL tree
Neither would I. Nonetheless the intersting fact is that the code compiles fine and the logic seems correct.
Ah, well...
- Dec 16, 2022 15:21
- Forum: Sources, Examples, Tips and Tricks
- Topic: Binary Search Tree and AVL tree
- Replies: 14
- Views: 5141
Re:
good job Joshy it would be a good job if it worked... :D inOrder : 5 10 15 20 30 40 50 55 60 65 70 80 85 90 delete 60 inOrder : 5 10 15 20 30 40 50 55 65 70 80 85 90 delete 55 inOrder : 5 10 15 20 30 40 50 65 70 80 85 90 delete 50 inOrder : 5 10 15 20 30 40 65 70 80 85 90 delete 40 inOrder : 15 20 ...
- Mar 24, 2022 14:20
- Forum: Game Dev
- Topic: Rotozoom archive restored
- Replies: 6
- Views: 4895
Re: Rotozoom archive restored
I guess it's nice. I can only "guess" because when I compile (1.09 64bit) I get: all.asm:869: Error: incorrect register `ebx' used with `q' suffix all.asm:872: Error: incorrect register `ebx' used with `q' suffix all.asm:941: Error: incorrect register `eax' used with `q' suffix all.asm:172...
- Sep 23, 2021 14:15
- Forum: Sources, Examples, Tips and Tricks
- Topic: Bingo!
- Replies: 1
- Views: 2623
Bingo!
Every Christmas is the same story: we want to play bingo but either we can't find the cards or some are missing. With this little program you can print one or more random series of 6 cards. the program output will be a printable html file, located in the same directory as the executable. the quantit...
- Jun 26, 2020 15:33
- Forum: Beginners
- Topic: Is this a "Pointer mess"?
- Replies: 7
- Views: 1443
Re: Is this a "Pointer mess"?
Thanks a lot, fxm, the problem was just under my eyes but I couldn't see it. I was keeping on confusing 32 (the number of bits in a qword) with 8 (the bits in a byte).
Again, thanks to you all! :)
Again, thanks to you all! :)
- Jun 26, 2020 15:21
- Forum: Beginners
- Topic: Is this a "Pointer mess"?
- Replies: 7
- Views: 1443
Re: Is this a "Pointer mess"?
Unfortunately the solution has to be built with no array: the allocation table is part of an object (I am writing an AVL Tree indexing object) and, as you know, dynamic arrays are not allowed within an object...
- Jun 26, 2020 7:08
- Forum: Beginners
- Topic: Is this a "Pointer mess"?
- Replies: 7
- Views: 1443
Is this a "Pointer mess"?
Hi guys, keeping track of which records have been deleted in a table has always ben an issue to me, so I wrote a simple routine that uses an allocated memory area as a bitmask: dim shared as ulong FreeSlots, PoolSize dim as ushort i, x dim as ulong ptr table function FindFreeSlot(byref rm as ulong p...
- Oct 19, 2011 21:13
- Forum: General
- Topic: Very strange problem with font rendering
- Replies: 2
- Views: 981
You may have a look at Cairo for simple text rendering. And for advanced textes (multiline, I18N, ...) use PangoCairo or GooCanvas. To start with: I'm sorry for being so late in answering but I had troubles with my old PC. Now it's fixed so I'm back again. Thanks for the suggestion: I'll surely giv...
- Sep 27, 2011 12:44
- Forum: General
- Topic: Very strange problem with font rendering
- Replies: 2
- Views: 981
Very strange problem with font rendering
Hi! Here is a problem I've got with the XFont library. With xfconv.exe I created five XF fonts from "verdana.ttf": v10.xf, v14.xf, v16.xf, v20.xf and v22.xf (of course the name of the files is simply the pitch size). Here is the code I wrote to load and test the rendering: #include "w...
- Jul 04, 2011 19:39
- Forum: Projects
- Topic: FBIde 0.4.6 r3 Avilable now
- Replies: 83
- Views: 58313