Search found 219 matches

by RockTheSchock
Dec 04, 2015 12:58
Forum: Community Discussion
Topic: Select case VALUE within array, and sets in general
Replies: 10
Views: 1229

Re: Select case VALUE within array, and sets in general

Please not another quirky syntax. just to allow UDTs / arrays to be used in select case. The only thing needed, is to use the right operators. So for arrays you need the following operators for next step >= <= = If you implement them for udt's you could even use udt's in select cases. Dim value As I...
by RockTheSchock
Dec 01, 2015 11:42
Forum: Community Discussion
Topic: real classes and one pass compiler
Replies: 14
Views: 2048

Re: real classes and one pass compiler

I mean, as far as I understand the usage of interfaces, it's for providing a sort of blueprint, with a skeleton filled with void. But this is possible to do this with base classes. So I must miss something here. Multiple inheritance with classes has many sideeffects which can get very complex. With...
by RockTheSchock
Nov 28, 2015 10:41
Forum: Community Discussion
Topic: real classes and one pass compiler
Replies: 14
Views: 2048

Re: real classes and one pass compiler

So why not simply add at the type keyword level some modifier to specify byval, or byref? Maybe also it's what you have implicitely meant when it has been refered to "real classes" in your introduction about including byref at inner udt fields declaration level. Hi Tourist Trap, well, tha...
by RockTheSchock
Nov 27, 2015 11:18
Forum: Community Discussion
Topic: real classes and one pass compiler
Replies: 14
Views: 2048

Re: real classes and one pass compiler

'aggregation' ('As UDT Ptr'): The Type only contains a pointer to the component object, and this component object has an existence independent of the Type object (before use, this pointer must refer to an already existing component object). No, the pointer must refer to a definition of an object (l...
by RockTheSchock
Nov 26, 2015 23:15
Forum: Community Discussion
Topic: real classes and one pass compiler
Replies: 14
Views: 2048

real classes and one pass compiler

I am far from being a compiler expert, but i just had an idea. I have many situations where i would like to make cyclic references in types without the need to use pointer and type aliases. Wouldn't it be possible to make byref fields in types which hide the pointers to objects. Why is there even a ...
by RockTheSchock
Nov 20, 2015 12:51
Forum: Beginners
Topic: Is there any real Basic implementation for GTK+ ?
Replies: 32
Views: 2999

Re: Is there any real Basic implementation for GTK+ ?

I would say Python is the best beginner language because you are forced to indent your code. To write readable source with less errors you need indentation! There is not the Basic language or the best language. As more advanced programmer you have one prefered language and at least 2-3 additional la...
by RockTheSchock
Nov 17, 2015 13:32
Forum: General
Topic: Contering C++ code to FreeBASIC
Replies: 3
Views: 454

Re: Contering C++ code to FreeBASIC

There is also some space to optimize the algorithm / code. I estimate speed improvements by 30% maybe even more. Now you read byte by byte and write byte by byte. But you could read 8 bytes at once and write one byte at a time ( or other way aorund read single bytes and then write 8 bytes in one chu...
by RockTheSchock
Nov 17, 2015 11:15
Forum: General
Topic: Contering C++ code to FreeBASIC
Replies: 3
Views: 454

Re: Contering C++ code to FreeBASIC

I translated the code. It does compile fine, but i am not sure if I did all boundaries right. So be prepared for crashes because of memory violations at runtime. '//************************************************// '//Function: AntiRotateBmp90D // '// Utility: Transform bmp format bit image into pr...
by RockTheSchock
Nov 06, 2015 12:51
Forum: Beginners
Topic: No values when compiling with -lang fblite
Replies: 2
Views: 612

Re: No values when compiling with -lang fblite

Standard Datatype QB is SINGLE while with FBLite it's Integer

You just need insert as first line:
DefSng A-Z
by RockTheSchock
Oct 28, 2015 15:49
Forum: Tips and Tricks
Topic: Change .bas extension to allow deeper windows search
Replies: 4
Views: 942

Re: Change .bas extension to allow deeper windows search

This is the plot. On Windows (I'm on XP so it would at least be true for this version) one can perform a search for a file by its text content. But it relies on the file extension. ... I had about 450 files to search for only 3 results. So I would hardly have found the files by luck, and it was wor...
by RockTheSchock
Oct 27, 2015 7:51
Forum: General
Topic: Random Numbers
Replies: 40
Views: 2789

Re: Random Numbers

Why dont you use the algorithm 5 as parameter?
RANDOMIZE TIMER,5

Call this once and rnd should generate very random numbers.
by RockTheSchock
Oct 12, 2015 21:37
Forum: Game Dev
Topic: Bigdata and game simulation
Replies: 7
Views: 1447

Re: Bigdata and game simulation

Well, I made an example of how to split your project over multiple files. bigdatademo.bas (main) sitizen.bas / sitizen.bi bigdata.bas / bigdata.bi messaging.bas / messaging.bi coordinate.bas / coordinate.bi geolocalisation.bi http://s000.tinyupload.com/index.php?file_id=61344134289277558265 You can ...
by RockTheSchock
Sep 08, 2015 21:30
Forum: General
Topic: How initialize a data memory area as quickly as possible?
Replies: 37
Views: 2831

Re: How initialize a data memory area as quickly as possible

Remember the question! "How initialize a data memory area as quickly as possible?" Well. i have asked for a bigger picture once because there are other solutions than only optimizing speed of data writes. A much more effective way could be to minimize the size of memory to clear. Or anothe...
by RockTheSchock
Sep 07, 2015 7:47
Forum: General
Topic: How initialize a data memory area as quickly as possible?
Replies: 37
Views: 2831

Re: How initialize a data memory area as quickly as possible

Why do you need such a big byte array? What do you want to do? Are you making a chess engine? Maybe you could use another algorithm that uses less memory.

Go to advanced search