Search found 2876 matches

by Tourist Trap
Jun 15, 2020 18:28
Forum: Beginners
Topic: DIR is driving me nuts.
Replies: 19
Views: 550

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: 681

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: 681

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: 681

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: 681

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: 358

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: 863

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: 358

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: 393

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: 598

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: 598

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...
by Tourist Trap
Jun 06, 2020 15:05
Forum: General
Topic: Windowtitle not working when using SetProcessDpiAwareness
Replies: 7
Views: 209

Re: Windowtitle not working when using SetProcessDpiAwareness

When I use the winapi call SetProcessDpiAwareness then the windows title is empty. Hi UEZ, We had a discussion about Dpiawareness months ago, when doing freebasic game challenge, and we tried many ways to do this (adding a manifest and so on...). It came out that among all the others testes at the ...
by Tourist Trap
Jun 03, 2020 16:30
Forum: Beginners
Topic: Different Constructor for array than single instance
Replies: 4
Views: 203

Re: Different Constructor for array than single instance

To answer the strict meaning of the initial question, there is no way to implicitly call a constructor or another depending on whether you instantiate Ok, I see now. What about a farstrecthed form like this? It won't rely on the constructors if you use the proper alternate initialisation, and will ...
by Tourist Trap
Jun 03, 2020 11:49
Forum: Beginners
Topic: Different Constructor for array than single instance
Replies: 4
Views: 203

Re: Different Constructor for array than single instance

Does anyone know how to use a different constructor depending on if a type is created as an array instead of a single instance? I don't even know what to search for to find this in the forumn. Hello apimpnamedshane, I think I can see what you want to say. For buiding a UDT that behaves as an array ...
by Tourist Trap
Jun 02, 2020 19:23
Forum: Community Discussion
Topic: FreeBASIC vs QB64
Replies: 23
Views: 959

Re: FreeBASIC vs QB64

These modern flat screen monitors I am sure are bad for the eyes. Not all flat screens are equal and the environment is important too. Agreed. That's why I'm so angry about those led lighting everywhere. They are far too powerful and tiresome for the eyes. The good old yellowish sodium lights are u...

Go to advanced search