Search found 225 matches

by RockTheSchock
Apr 09, 2018 22:43
Forum: General
Topic: Best Database practice
Replies: 6
Views: 530

Re: Best Database practice

I would LOVE to have direct MySQL support but I have no way of having "offline" support (if the database server or back office computer was switched off) as I can not run local version of MySQL on the machines I have as it would slow them down WAY to much. I wonder what is happening now, ...
by RockTheSchock
Jan 18, 2018 20:40
Forum: Community Discussion
Topic: When Implementing Classes...
Replies: 6
Views: 1145

Re: When Implementing Classes...

I would design classes for shorter and more friendly oop code. I also like Java interfaces. -members private like in C++ or maybe protected as default. -No Declare statements needed. -Define member procedures inline and virtual -2 pass compiler / parser would be needed -class extends automatically o...
by RockTheSchock
Aug 04, 2017 6:19
Forum: Beginners
Topic: Arrays
Replies: 17
Views: 1532

Re: Arrays

Allways use local integer/uinteger variable as index for small arrays. It should be safer and faster. You can also use lbound / ubound if array size is dynamic or if you change it later sometimes.

Code: Select all

Dim Buf(1 To 128) as Ubyte

For i As Integer= lbound(buf) to ubound(buf)
    Buf(i) = i
Next
by RockTheSchock
Feb 08, 2017 22:36
Forum: Beginners
Topic: Max Lines
Replies: 13
Views: 1531

Re: Max Lines

You know that you could split your code into modules? So you only need to recompile the changed ones.
by RockTheSchock
Aug 16, 2016 2:00
Forum: General
Topic: fbc plugins
Replies: 1
Views: 447

fbc plugins

I am trying to implement a plugin extension for fbc. I am successfully loading plugins and call init and visitor functions. But where should i put the callback visitor functions in the compiler? I am absolutly lost. I tried in ast-node-proc at the end of: function astAdd( byval n as ASTNODE ptr ) as...
by RockTheSchock
Aug 16, 2016 0:36
Forum: General
Topic: Howto initialise string array
Replies: 3
Views: 692

Re: Howto initialise string array

Zstring*31 - that was simple!

Thank you. srvaldez
by RockTheSchock
Aug 15, 2016 23:04
Forum: General
Topic: Howto initialise string array
Replies: 3
Views: 692

Howto initialise string array

I would like to Initialise an array but i get: FreeBasic/src/compiler/enumstrings.bi(46) error 86: Var-len strings cannot be initialized in '"AST_CLASSES" }' Dim Shared As String AST_NODECLASS_STR(0 TO ...) = {_ "AST_NODECLASS_NOP",_ "AST_NODECLASS_LOAD",_ "AST_NOD...
by RockTheSchock
Aug 12, 2016 7:12
Forum: Beginners
Topic: Is there an IDE which supports UNICODE ?
Replies: 10
Views: 849

Re: Is there an IDE which supports UNICODE ?

Geany works. But you need to use extra libraries like cairo for output. Print and "draw string" dont support unicode.
by RockTheSchock
Aug 10, 2016 20:32
Forum: General
Topic: Can not get a double buffering working well with thread (solved)
Replies: 43
Views: 1921

Re: Can not get a double buffering working well with thread (solved)

I wonder, why you would need multithreaded draw routines at all? Normally even big projects use one rendering thread. In Unreal Engine 4 (UE4), the entire renderer operates in its own thread that is a frame or two behind the game thread. Very calculation intensive tasks with much local - almost no s...
by RockTheSchock
Aug 10, 2016 16:29
Forum: General
Topic: Can not get a double buffering working well with thread (solved)
Replies: 43
Views: 1921

Re: Can not get a double buffering working well with thread (solved)

I think the problem is that if you have 2 threads, one that erases complete screen and another thread with a sprite moving screenlock / screenunlock does flicker. But what would work are several drawing threads with non intersecting animations, with maybe occasional cls.
by RockTheSchock
Aug 09, 2016 22:31
Forum: General
Topic: howto workaround interfaces?
Replies: 3
Views: 425

Re: howto workaround interfaces?

i am learning more and more about the vtable design. FBC repository and wikipedia is my friend: https://en.wikipedia.org/wiki/Virtual_method_table . And there was a nice diagram by fxm. Hope i understood it correctly. Some thought how to implement interfaces with only abstract methods: - we would ne...
by RockTheSchock
Aug 09, 2016 18:32
Forum: General
Topic: howto workaround interfaces?
Replies: 3
Views: 425

howto workaround interfaces?

How would you implement interfaces when you would write sort of a java parser -> freebasic generator. I would like to write something to automatically translate awt/swing classes and interfaces. I thought to generate fb headers from java source code for public methods and fields and later reimplemen...
by RockTheSchock
Aug 09, 2016 0:53
Forum: General
Topic: UDTs inflating rate (solved)
Replies: 13
Views: 987

Re: UDTs inflating rate (solved)

Hi,if we compare two codes performing the same task, one coded in the procedural way, and the other with embedding stuff in UDT, it seems obvious that there is some more code lines to produce for a UDT. Well, your example is very simple. Especially when using virtual member functions where the auto...
by RockTheSchock
Jul 31, 2016 11:22
Forum: Community Discussion
Topic: I wish a big bundle
Replies: 37
Views: 5213

I wish a big bundle

I know it's a lot of work making a big bundle, with all libraries for various platforms. But lets see. I tried to get a static library of sqlite3 yesterday. It took me one hour to get a working dll.a out of the .def file from the website. It took me several hours to create the static lib. I am not a...
by RockTheSchock
Jul 28, 2016 6:32
Forum: General
Topic: Flat File Database Example
Replies: 10
Views: 1324

Re: Flat File Database Example

If I remember correctly in QB PDS ISAM(Indexed Sequential Access Method) was introduced for RANDOM files, so that you could actually use theese files like a real database. The index file speeds up the search (reading) at the cost of complexity (lower write speed). You could simulate something like t...

Go to advanced search