Search found 2892 matches

by Tourist Trap
Jun 18, 2020 16:46
Forum: Beginners
Topic: Any suggestions on the best way to set up a linked list?
Replies: 24
Views: 1328

Re: Any suggestions on the best way to set up a linked list?

Hi, I am strugging to remember how to set up a linked list. Hi olympic sleeper, Here is an example of mine that looks like what you are trying. It's bones that are linked list with some graphical sugar: ''-------------------------------------------------- '' "funky swimmer demo" to test t...
by Tourist Trap
Jun 17, 2020 22:25
Forum: General
Topic: Duplicates
Replies: 34
Views: 1634

Re: Duplicates

jj2007 wrote:Have you ever tried to sort a billion lines of text? Any idea how much time it will take?

I think this kind of files is the reason why people use database systems.
by Tourist Trap
Jun 17, 2020 17:25
Forum: Tips and Tricks
Topic: Greedy Worm build 2020-06-16
Replies: 3
Views: 311

Re: Greedy Worm build 2020-06-16

:-)
Really impressive both of those programs. You guys are artists.
by Tourist Trap
Jun 16, 2020 18:02
Forum: General
Topic: Squares
Replies: 8041
Views: 508218

Re: Squares

I'm absolutely not able to do compression. I can change the representation of a number throught its base, that's all. However, if I wanted to get started in the domain, I would probably try to implement simple and well known already existing algorithm. For instance, here is a website that I find ver...
by Tourist Trap
Jun 15, 2020 18:28
Forum: Beginners
Topic: DIR is driving me nuts.
Replies: 19
Views: 924

Re: DIR is driving me nuts.

Hello, for me this code (copied from your post) works: #include "dir.bi" 'provides constants to use for the attrib_mask parameter Sub list_files (ByRef filespec As String, ByVal attrib As Integer) Dim As String filename = Dir(filespec, attrib) ' Start a file search with the specified files...
by Tourist Trap
Jun 14, 2020 16:04
Forum: Beginners
Topic: Could somone explain how to use bit, bit set etc?
Replies: 23
Views: 1145

Re: Could somone explain how to use bit, bit set etc?

fxm wrote:Done.

Thanks fxm. I fits better now when you read the whole paragraph.
by Tourist Trap
Jun 14, 2020 15:14
Forum: Beginners
Topic: Could somone explain how to use bit, bit set etc?
Replies: 23
Views: 1145

Re: Could somone explain how to use bit, bit set etc?

See my last update for BitSet / BitReset pages. Hi fxm, I understand your concern, but in my opinion you won't be able to make a sufficently clear sentence in this top description. What is interesting from a user point of view is to know that in order to apply the change with this keyword it will h...
by Tourist Trap
Jun 13, 2020 21:58
Forum: Beginners
Topic: Could somone explain how to use bit, bit set etc?
Replies: 23
Views: 1145

Re: Could somone explain how to use bit, bit set etc?

Only a copy of it is so processed. Yes. The other point that maybe is not clear, is this one: The valid range of values for bit_number depends on the size, in bits, of `Typeof(value)`, which is `0` (from the lowest bit) through `Sizeof(value) * 8 - 1` (up to the highest bit). That's clear here, but...
by Tourist Trap
Jun 13, 2020 18:03
Forum: Beginners
Topic: Could somone explain how to use bit, bit set etc?
Replies: 23
Views: 1145

Re: Could somone explain how to use bit, bit set etc?

Hope someone can provide a clue. Hi, I would first recommend the doc pages: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgBitreset But I know it often won't be as clear as a direct explanation. I'm not a specialist of bitwise stuff, but here is an example: var a = 3333 ? "a numeric value...
by Tourist Trap
Jun 13, 2020 17:31
Forum: Beginners
Topic: Limitations of the paint command
Replies: 6
Views: 488

Re: Limitations of the paint command

Thank you for your replies. I'll try to incorporate your ideas. Is a revised paint command possible? Paint target,(x,y), fillcolor,bordercolor1,bordercolor 2... Paul22 Hi Paul22, unfortunately I think you'll have to drop some of the syntactic sugar of the original paint, if you decide to undefine t...
by Tourist Trap
Jun 12, 2020 2:37
Forum: Beginners
Topic: Can FB create arrays of constant values? [YES]
Replies: 7
Views: 982

Re: Can FB create arrays of constant values? [YES]

I think we can also have a static array of const:

Code: Select all

static as integer test(0 to 3) = {11, 22, 33, 44}



About CONST, it can guess the type so it's more like that I think:

Code: Select all

const A = 99         'I think means: var as const A = 99
by Tourist Trap
Jun 09, 2020 19:44
Forum: Beginners
Topic: Limitations of the paint command
Replies: 6
Views: 488

Re: Limitations of the paint command

Hi I have come across this problem several times. Try to fill an area bounded by several colors . Hi paul22, it comes out that this below works (press a key to see how it behaves when you run it): screenRes 400, 400, 32 dim as any ptr imagebuffer = imageCreate(400, 400, rgb(100,120,120)) line (100,...
by Tourist Trap
Jun 07, 2020 19:55
Forum: Beginners
Topic: Complex word replacement in a string problem
Replies: 8
Views: 473

Re: Complex word replacement in a string problem

Welcome. I guess this old stuff of mine can do the job. I don't really remember well how it works, but there is examples of usage at the end of the code. If the variable "sentence" be replaced by something of your own, you can try it if you want. It has some additional capabilities about c...
by Tourist Trap
Jun 06, 2020 17:53
Forum: General
Topic: Optimum sum of a set of numbers
Replies: 18
Views: 790

Re: Optimum sum of a set of numbers

Again, Thank y'all for the prompt help!!! Nick Those guys are too fast :) So here is my contrib. Something is wrong, I'm having some weird issue with the subset generation. I guess I wanted to do something like shown at grindstone example but failed. However I added some simple graphics at the end....
by Tourist Trap
Jun 06, 2020 15:28
Forum: General
Topic: Optimum sum of a set of numbers
Replies: 18
Views: 790

Re: Optimum sum of a set of numbers

I need to get the optimum sum of these numbers not to exceed a particular number like 1000. Hello, nice idea to get the brain training on this kind of problems in FB. It's quite rewarding. I don't understand something, here above however. Do you mean you want to find a subset of your list of number...

Go to advanced search